diff options
author | Jan Malakhovski <oxij@oxij.org> | 2018-08-05 19:24:46 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2018-08-05 19:24:46 +0000 |
commit | eb5b313b1669d41f301363824e20cd3669d7da64 (patch) | |
tree | 6faf2be71a425a917e842ac6b88ec149f1317756 | |
parent | a53504f4a428529e08beda8956f96e7337bb6d12 (diff) | |
download | nixlib-eb5b313b1669d41f301363824e20cd3669d7da64.tar nixlib-eb5b313b1669d41f301363824e20cd3669d7da64.tar.gz nixlib-eb5b313b1669d41f301363824e20cd3669d7da64.tar.bz2 nixlib-eb5b313b1669d41f301363824e20cd3669d7da64.tar.lz nixlib-eb5b313b1669d41f301363824e20cd3669d7da64.tar.xz nixlib-eb5b313b1669d41f301363824e20cd3669d7da64.tar.zst nixlib-eb5b313b1669d41f301363824e20cd3669d7da64.zip |
stdenv: shadow outputs
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 9aed883d57ca..560aa72eb392 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -83,6 +83,10 @@ rec { doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform; doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform; + outputs' = + outputs ++ + (if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []); + fixedOutputDrv = attrs ? outputHash; noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated ++ depsHostHost ++ depsHostHostPropagated @@ -105,6 +109,8 @@ rec { doCheck = doCheck'; doInstallCheck = doInstallCheck'; + outputs = outputs'; + references = nativeBuildInputs ++ buildInputs ++ propagatedNativeBuildInputs ++ propagatedBuildInputs; @@ -141,10 +147,6 @@ rec { ] ]; - outputs' = - outputs ++ - (if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []); - computedSandboxProfile = lib.concatMap (input: input.__propagatedSandboxProfile or []) (stdenv.extraNativeBuildInputs @@ -215,10 +217,10 @@ rec { ++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}"; inherit doCheck doInstallCheck; + + inherit outputs; } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) { NIX_HARDENING_ENABLE = enabledHardeningOptions; - } // lib.optionalAttrs (outputs' != [ "out" ]) { - outputs = outputs'; } // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) { # TODO: remove lib.unique once nix has a list canonicalization primitive __sandboxProfile = @@ -259,9 +261,8 @@ rec { # unless they are comfortable with this default. outputsToInstall = let - outs = outputs'; # the value passed to derivation primitive - hasOutput = out: builtins.elem out outs; - in [( lib.findFirst hasOutput null (["bin" "out"] ++ outs) )]; + hasOutput = out: builtins.elem out outputs; + in [( lib.findFirst hasOutput null (["bin" "out"] ++ outputs) )]; } // attrs.meta or {} # Fill `meta.position` to identify the source location of the package. |