python3,python2: partially apply hasSuffix
This commit is contained in:
@@ -59,6 +59,8 @@ let
|
||||
in
|
||||
fixedWidthString len " " name;
|
||||
|
||||
hasZipSuffix = hasSuffix "zip";
|
||||
|
||||
isPythonModule =
|
||||
drv:
|
||||
# all pythonModules have the pythonModule attribute
|
||||
@@ -317,7 +319,7 @@ lib.extendMkDerivation {
|
||||
++ optionals removeBinBytecode [
|
||||
pythonRemoveBinBytecodeHook
|
||||
]
|
||||
++ optionals (hasSuffix "zip" (finalAttrs.src.name or "")) [
|
||||
++ optionals (attrs ? src.name && hasZipSuffix attrs.src.name) [
|
||||
unzip
|
||||
]
|
||||
++ optionals (format' == "setuptools") [
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
eggBuildHook,
|
||||
eggInstallHook,
|
||||
}:
|
||||
let
|
||||
hasZipSuffix = lib.hasSuffix "zip";
|
||||
in
|
||||
lib.extendMkDerivation {
|
||||
constructDrv = stdenv.mkDerivation;
|
||||
|
||||
@@ -207,7 +210,7 @@ lib.extendMkDerivation {
|
||||
++ lib.optionals removeBinBytecode [
|
||||
pythonRemoveBinBytecodeHook
|
||||
]
|
||||
++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [
|
||||
++ lib.optionals (attrs ? src.name && hasZipSuffix attrs.src.name) [
|
||||
unzip
|
||||
]
|
||||
++ lib.optionals (format == "setuptools") [
|
||||
|
||||
Reference in New Issue
Block a user