Run nixpkgs-fmt after the nixpkgs bump

This commit is contained in:
adisbladis 2021-12-25 16:00:20 -08:00
parent 3be424ac55
commit 2c63047ee1
4 changed files with 29 additions and 29 deletions

View file

@ -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

View file

@ -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

View file

@ -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 { };

View file

@ -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