diff options
-rw-r--r-- | doc/stdenv.xml | 14 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/mk-python-derivation.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 8 |
3 files changed, 22 insertions, 2 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 2a3316b8d0183..31d3d0ca3c4ed 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -1006,6 +1006,13 @@ but only if the <varname>doCheck</varname> variable is enabled.</para> </varlistentry> <varlistentry> + <term><varname>checkInputs</varname></term> + <listitem><para> + A list of dependencies used by the phase. This gets included in <varname>buildInputs</varname> when <varname>doCheck</varname> is set. + </para></listitem> + </varlistentry> + + <varlistentry> <term><varname>makeFlags</varname> / <varname>makeFlagsArray</varname> / <varname>makefile</varname></term> @@ -1292,6 +1299,13 @@ installcheck</command>.</para> </varlistentry> <varlistentry> + <term><varname>installCheckInputs</varname></term> + <listitem><para> + A list of dependencies used by the phase. This gets included in <varname>buildInputs</varname> when <varname>doInstallCheck</varname> is set. + </para></listitem> + </varlistentry> + + <varlistentry> <term><varname>preInstallCheck</varname></term> <listitem><para>Hook executed at the start of the installCheck phase.</para></listitem> diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 9835ba32d170d..63ffdbb8c0ac4 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 96e40a78e518d..b523374454fc7 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"]) // { |