mk-python-derivation: Break out attribute set cleaning into a separate function
With precomputed static lists.
This commit is contained in:
parent
1656fe1bf6
commit
de402796a7
1 changed files with 7 additions and 5 deletions
|
@ -59,6 +59,12 @@ let
|
||||||
|
|
||||||
isSetuptoolsDependency' = lib.flip elem [ "setuptools" "wheel" ];
|
isSetuptoolsDependency' = lib.flip elem [ "setuptools" "wheel" ];
|
||||||
|
|
||||||
|
cleanAttrs = lib.flip removeAttrs [
|
||||||
|
"disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "pyproject" "format"
|
||||||
|
"disabledTestPaths" "outputs" "stdenv"
|
||||||
|
"dependencies" "optional-dependencies" "build-system"
|
||||||
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{ name ? "${attrs.pname}-${attrs.version}"
|
{ name ? "${attrs.pname}-${attrs.version}"
|
||||||
|
@ -227,11 +233,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
|
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
|
||||||
self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
|
self = toPythonModule (stdenv.mkDerivation ((cleanAttrs attrs) // {
|
||||||
"disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "pyproject" "format"
|
|
||||||
"disabledTestPaths" "outputs" "stdenv"
|
|
||||||
"dependencies" "optional-dependencies" "build-system"
|
|
||||||
]) // {
|
|
||||||
|
|
||||||
name = namePrefix + name;
|
name = namePrefix + name;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue