diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 2a3316b8d01..31d3d0ca3c4 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -1005,6 +1005,13 @@ but only if the doCheck variable is enabled. + + checkInputs + + A list of dependencies used by the phase. This gets included in buildInputs when doCheck is set. + + + makeFlags / makeFlagsArray / @@ -1291,6 +1298,13 @@ installcheck. + + installCheckInputs + + A list of dependencies used by the phase. This gets included in buildInputs when doInstallCheck is set. + + + preInstallCheck Hook executed at the start of the installCheck diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 9835ba32d17..63ffdbb8c0a 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -75,7 +75,6 @@ toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [ buildInputs = [ wrapPython ] ++ lib.optional (lib.hasSuffix "zip" (attrs.src.name or "")) unzip - ++ lib.optionals doCheck checkInputs ++ lib.optional catchConflicts setuptools # If we no longer propagate setuptools ++ buildInputs ++ pythonPath; @@ -86,6 +85,7 @@ toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [ # Python packages don't have a checkPhase, only an installCheckPhase doCheck = false; doInstallCheck = doCheck; + installCheckInputs = checkInputs; postFixup = lib.optionalString (!dontWrapPythonPrograms) '' wrapPythonPrograms diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 96e40a78e51..b523374454f 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -36,6 +36,9 @@ rec { , depsTargetTarget ? [] # 1 -> 1 , depsTargetTargetPropagated ? [] # 1 -> 1 + , checkInputs ? [] + , installCheckInputs ? [] + # Configure Phase , configureFlags ? [] , # Target is not included by default because most programs don't care. @@ -101,7 +104,9 @@ rec { ] [ (map (drv: drv.__spliced.hostHost or drv) depsHostHost) - (map (drv: drv.crossDrv or drv) buildInputs) + (map (drv: drv.crossDrv or drv) (buildInputs + ++ lib.optionals doCheck' checkInputs + ++ lib.optionals doInstallCheck' installCheckInputs)) ] [ (map (drv: drv.__spliced.targetTarget or drv) depsTargetTarget) @@ -155,6 +160,7 @@ rec { (removeAttrs attrs ["meta" "passthru" "crossAttrs" "pos" "doCheck" "doInstallCheck" + "checkInputs" "installCheckInputs" "__impureHostDeps" "__propagatedImpureHostDeps" "sandboxProfile" "propagatedSandboxProfile"]) // {