diff options
Diffstat (limited to 'pkgs/development/interpreters/python/mk-python-derivation.nix')
-rw-r--r-- | pkgs/development/interpreters/python/mk-python-derivation.nix | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index d656760a71a1c..086ebfb3ed045 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -17,11 +17,11 @@ , pythonImportsCheckHook , pythonNamespacesHook , pythonOutputDistHook +, pythonRelaxDepsHook , pythonRemoveBinBytecodeHook , pythonRemoveTestsDirHook , pythonRuntimeDepsCheckHook , setuptoolsBuildHook -, setuptoolsCheckHook , wheelUnpackHook , eggUnpackHook , eggBuildHook @@ -252,6 +252,8 @@ let # because the hook that checks for conflicts uses setuptools. # pythonCatchConflictsHook + ] ++ optionals (attrs ? pythonRelaxDeps || attrs ? pythonRemoveDeps) [ + pythonRelaxDepsHook ] ++ optionals removeBinBytecode [ pythonRemoveBinBytecodeHook ] ++ optionals (hasSuffix "zip" (attrs.src.name or "")) [ @@ -305,18 +307,12 @@ let inherit strictDeps; - LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8"; + LANG = "${if python.stdenv.hostPlatform.isDarwin then "en_US" else "C"}.UTF-8"; # Python packages don't have a checkPhase, only an installCheckPhase doCheck = false; doInstallCheck = attrs.doCheck or true; - nativeInstallCheckInputs = [ - ] ++ optionals (format' == "setuptools") [ - # Longer-term we should get rid of this and require - # users of this function to set the `installCheckPhase` or - # pass in a hook that sets it. - setuptoolsCheckHook - ] ++ nativeCheckInputs; + nativeInstallCheckInputs = nativeCheckInputs; installCheckInputs = checkInputs; postFixup = optionalString (!dontWrapPythonPrograms) '' |