diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-01-24 00:18:38 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-08-29 14:49:51 +0300 |
commit | 5326e85f3d7b5b222ccd158f25f0f15a60b458ec (patch) | |
tree | d2afb8ef2d8b35de1c965f6bcf431508cc9b1145 /pkgs/stdenv/generic | |
parent | 3243c4f2722f1fa55f31247f8c8f16216fe8b95f (diff) |
stdenv.mkDerivation: Use chooseDevOutputs
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index cf7894fc005ba..e71c2f770b9b3 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -158,9 +158,13 @@ let outputs ++ (if separateDebugInfo then assert result.isLinux; [ "debug" ] else []); - buildInputs' = buildInputs ++ + buildInputs' = lib.chooseDevOutputs buildInputs ++ (if separateDebugInfo then [ ../../build-support/setup-hooks/separate-debug-info.sh ] else []); + nativeBuildInputs' = lib.chooseDevOutputs nativeBuildInputs; + propagatedBuildInputs' = lib.chooseDevOutputs propagatedBuildInputs; + propagatedNativeBuildInputs' = lib.chooseDevOutputs propagatedNativeBuildInputs; + in # Throw an error if trying to evaluate an non-valid derivation @@ -176,13 +180,13 @@ let "sandboxProfile" "propagatedSandboxProfile"]) // (let computedSandboxProfile = - lib.concatMap (input: input.__propagatedSandboxProfile or []) (extraBuildInputs ++ buildInputs ++ nativeBuildInputs); + lib.concatMap (input: input.__propagatedSandboxProfile or []) (extraBuildInputs ++ buildInputs' ++ nativeBuildInputs'); computedPropagatedSandboxProfile = - lib.concatMap (input: input.__propagatedSandboxProfile or []) (propagatedBuildInputs ++ propagatedNativeBuildInputs); + lib.concatMap (input: input.__propagatedSandboxProfile or []) (propagatedBuildInputs' ++ propagatedNativeBuildInputs'); computedImpureHostDeps = - lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (extraBuildInputs ++ buildInputs ++ nativeBuildInputs)); + lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (extraBuildInputs ++ buildInputs' ++ nativeBuildInputs')); computedPropagatedImpureHostDeps = - lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (propagatedBuildInputs ++ propagatedNativeBuildInputs)); + lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (propagatedBuildInputs' ++ propagatedNativeBuildInputs')); in { builder = attrs.realBuilder or shell; @@ -194,17 +198,17 @@ let # Inputs built by the cross compiler. buildInputs = if crossConfig != null then buildInputs' else []; - propagatedBuildInputs = if crossConfig != null then propagatedBuildInputs else []; + propagatedBuildInputs = if crossConfig != null then propagatedBuildInputs' else []; # Inputs built by the usual native compiler. - nativeBuildInputs = nativeBuildInputs + nativeBuildInputs = nativeBuildInputs' ++ lib.optionals (crossConfig == null) buildInputs' ++ lib.optional (result.isCygwin || (crossConfig != null && lib.hasSuffix "mingw32" crossConfig)) ../../build-support/setup-hooks/win-dll-link.sh ; - propagatedNativeBuildInputs = propagatedNativeBuildInputs ++ - (if crossConfig == null then propagatedBuildInputs else []); + propagatedNativeBuildInputs = propagatedNativeBuildInputs' ++ + (if crossConfig == null then propagatedBuildInputs' else []); } // ifDarwin { # TODO: remove lib.unique once nix has a list canonicalization primitive __sandboxProfile = |