From a1a5ea59433257ab3a46bb67aaf05e9b7d8aa071 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 5 Jan 2019 10:54:04 +0100 Subject: [PATCH] stdenv: make checkInputs native We can't run the checkPhase when build != host, so we may as well make the checkInputs native. This signicantly improves the situation of Python packages when enabling strictDeps. --- doc/stdenv.xml | 2 +- pkgs/stdenv/generic/make-derivation.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/stdenv.xml b/doc/stdenv.xml index d3ee5164bc1d..9951b6bf13c3 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -1810,7 +1810,7 @@ set debug-file-directory ~/.nix-profile/lib/debug A list of dependencies used by the phase. This gets included in - buildInputs when doInstallCheck is + nativeBuildInputs when doInstallCheck is set. diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index f3c4afb613e6..88808a7b3f90 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -125,14 +125,14 @@ rec { (map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild) (map (drv: drv.nativeDrv or drv) nativeBuildInputs ++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh - ++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh) + ++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh + ++ lib.optionals doCheck checkInputs + ++ lib.optionals doInstallCheck' installCheckInputs) (map (drv: drv.__spliced.buildTarget or drv) depsBuildTarget) ] [ (map (drv: drv.__spliced.hostHost or drv) depsHostHost) - (map (drv: drv.crossDrv or drv) (buildInputs - ++ lib.optionals doCheck checkInputs - ++ lib.optionals doInstallCheck' installCheckInputs)) + (map (drv: drv.crossDrv or drv) buildInputs) ] [ (map (drv: drv.__spliced.targetTarget or drv) depsTargetTarget)