From 2c63047ee161f9dd2cb51e01446df41417a9b124 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 25 Dec 2021 16:00:20 -0800 Subject: [PATCH] Run nixpkgs-fmt after the nixpkgs bump --- default.nix | 42 ++++++++++++++-------------- lib.nix | 8 +++--- tests/default.nix | 4 +-- tests/mk-poetry-packages/default.nix | 4 +-- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/default.nix b/default.nix index c33cef2..ec36d79 100644 --- a/default.nix +++ b/default.nix @@ -76,9 +76,9 @@ lib.makeScope pkgs.newScope (self: { inherit version; /* Returns a package of editable sources whose changes will be available without needing to restart the - nix-shell. - In editablePackageSources you can pass a mapping from package name to source directory to have - those packages available in the resulting environment, whose source changes are immediately available. + nix-shell. + In editablePackageSources you can pass a mapping from package name to source directory to have + those packages available in the resulting environment, whose source changes are immediately available. */ mkPoetryEditablePackage = @@ -109,7 +109,7 @@ lib.makeScope pkgs.newScope (self: { }; /* - Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile. + Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile. */ mkPoetryPackages = { projectDir ? null @@ -231,8 +231,8 @@ lib.makeScope pkgs.newScope (self: { requiredPythonModules = python.pkgs.requiredPythonModules; /* Include all the nested dependencies which are required for each package. - This guarantees that using the "poetryPackages" attribute will return - complete list of dependencies for the poetry project to be portable. + This guarantees that using the "poetryPackages" attribute will return + complete list of dependencies for the poetry project to be portable. */ storePackages = requiredPythonModules (builtins.foldl' (acc: v: acc ++ v) [ ] (lib.attrValues inputAttrs)); in @@ -246,11 +246,11 @@ lib.makeScope pkgs.newScope (self: { }; /* Returns a package with a python interpreter and all packages specified in the poetry.lock lock file. - In editablePackageSources you can pass a mapping from package name to source directory to have - those packages available in the resulting environment, whose source changes are immediately available. + In editablePackageSources you can pass a mapping from package name to source directory to have + those packages available in the resulting environment, whose source changes are immediately available. - Example: - poetry2nix.mkPoetryEnv { poetrylock = ./poetry.lock; python = python3; } + Example: + poetry2nix.mkPoetryEnv { poetrylock = ./poetry.lock; python = python3; } */ mkPoetryEnv = { projectDir ? null @@ -274,10 +274,10 @@ lib.makeScope pkgs.newScope (self: { /* Creates a Python application from pyproject.toml and poetry.lock - The result also contains a .dependencyEnv attribute which is a python - environment of all dependencies and this apps modules. This is useful if - you rely on dependencies to invoke your modules for deployment: e.g. this - allows `gunicorn my-module:app`. + The result also contains a .dependencyEnv attribute which is a python + environment of all dependencies and this apps modules. This is useful if + you rely on dependencies to invoke your modules for deployment: e.g. this + allows `gunicorn my-module:app`. */ mkPoetryApplication = { projectDir ? null @@ -372,7 +372,7 @@ lib.makeScope pkgs.newScope (self: { /* - Create a new default set of overrides with the same structure as the built-in ones + Create a new default set of overrides with the same structure as the built-in ones */ mkDefaultPoetryOverrides = defaults: { __functor = defaults; @@ -396,26 +396,26 @@ lib.makeScope pkgs.newScope (self: { }; /* - The default list of poetry2nix override overlays + The default list of poetry2nix override overlays - Can be overriden by calling defaultPoetryOverrides.overrideOverlay which takes an overlay function + Can be overriden by calling defaultPoetryOverrides.overrideOverlay which takes an overlay function */ defaultPoetryOverrides = self.mkDefaultPoetryOverrides (import ./overrides.nix { inherit pkgs lib; }); /* - Convenience functions for specifying overlays with or without the poerty2nix default overrides + Convenience functions for specifying overlays with or without the poerty2nix default overrides */ overrides = { /* - Returns the specified overlay in a list + Returns the specified overlay in a list */ withoutDefaults = overlay: [ overlay ]; /* - Returns the specified overlay and returns a list - combining it with poetry2nix default overrides + Returns the specified overlay and returns a list + combining it with poetry2nix default overrides */ withDefaults = overlay: [ self.defaultPoetryOverrides diff --git a/lib.nix b/lib.nix index cb1cd8a..5fe5ad4 100644 --- a/lib.nix +++ b/lib.nix @@ -174,11 +174,11 @@ let lib.optionals (builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores; /* - Provides a source filtering mechanism that: + Provides a source filtering mechanism that: - - Filters gitignore's - - Filters pycache/pyc files - - Uses cleanSourceFilter to filter out .git/.hg, .o/.so, editor backup files & nix result symlinks + - Filters gitignore's + - Filters pycache/pyc files + - Uses cleanSourceFilter to filter out .git/.hg, .o/.so, editor backup files & nix result symlinks */ cleanPythonSources = { src }: let diff --git a/tests/default.nix b/tests/default.nix index 50d2b2b..20badfa 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -9,7 +9,7 @@ in }: let poetry = pkgs.callPackage ../pkgs/poetry { python = pkgs.python3; inherit poetry2nix; }; - poetry2nix = import ./.. { inherit pkgs;inherit poetry; }; + poetry2nix = import ./.. { inherit pkgs; inherit poetry; }; poetryLib = import ../lib.nix { inherit pkgs; lib = pkgs.lib; stdenv = pkgs.stdenv; }; pep425 = pkgs.callPackage ../pep425.nix { inherit poetryLib; }; pep425Python37 = pkgs.callPackage ../pep425.nix { inherit poetryLib; python = pkgs.python37; }; @@ -26,7 +26,7 @@ builtins.removeAttrs override-default = callTest ./override-default-support { }; common-pkgs-1 = callTest ./common-pkgs-1 { }; common-pkgs-2 = callTest ./common-pkgs-2 { }; - pep425 = pkgs.callPackage ./pep425 { inherit pep425;inherit pep425OSX;inherit pep425Python37; }; + pep425 = pkgs.callPackage ./pep425 { inherit pep425; inherit pep425OSX; inherit pep425Python37; }; env = callTest ./env { }; pytest-randomly = callTest ./pytest-randomly { }; file-src-deps = callTest ./file-src-deps { }; diff --git a/tests/mk-poetry-packages/default.nix b/tests/mk-poetry-packages/default.nix index e0541a9..c3ffd1d 100644 --- a/tests/mk-poetry-packages/default.nix +++ b/tests/mk-poetry-packages/default.nix @@ -1,7 +1,7 @@ /* It is assumed that propagated dependencies are included in the poetryPackages. - The "certifi" is direct dependency of "requests" library. + The "certifi" is direct dependency of "requests" library. - Note: this test assumes that "certifi" lib is going to be a dep of "requests" in the future. + Note: this test assumes that "certifi" lib is going to be a dep of "requests" in the future. */ { lib, poetry2nix, python3, python37 }: let