diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index bdb4969bf164..971eacb71d9c 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -39,6 +39,7 @@ # Dependencies needed for running the checkPhase. # These are added to buildInputs when doCheck = true. , checkInputs ? [] +, nativeCheckInputs ? [] # propagate build dependencies so in case we have A -> B -> C, # C can import package A propagated by B @@ -114,7 +115,7 @@ let name_ = name; self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [ - "disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format" + "disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format" "disabledTestPaths" "outputs" ]) // { @@ -169,13 +170,14 @@ let # Python packages don't have a checkPhase, only an installCheckPhase doCheck = false; doInstallCheck = attrs.doCheck or true; - installCheckInputs = [ + nativeInstallCheckInputs = [ ] ++ lib.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 - ] ++ checkInputs; + ] ++ nativeCheckInputs; + installCheckInputs = checkInputs; postFixup = lib.optionalString (!dontWrapPythonPrograms) '' wrapPythonPrograms