stdenv: shadow outputs
This commit is contained in:
parent
a53504f4a4
commit
eb5b313b16
@ -83,6 +83,10 @@ rec {
|
|||||||
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
|
|
||||||
|
outputs' =
|
||||||
|
outputs ++
|
||||||
|
(if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []);
|
||||||
|
|
||||||
fixedOutputDrv = attrs ? outputHash;
|
fixedOutputDrv = attrs ? outputHash;
|
||||||
noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
|
noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
|
||||||
++ depsHostHost ++ depsHostHostPropagated
|
++ depsHostHost ++ depsHostHostPropagated
|
||||||
@ -105,6 +109,8 @@ rec {
|
|||||||
doCheck = doCheck';
|
doCheck = doCheck';
|
||||||
doInstallCheck = doInstallCheck';
|
doInstallCheck = doInstallCheck';
|
||||||
|
|
||||||
|
outputs = outputs';
|
||||||
|
|
||||||
references = nativeBuildInputs ++ buildInputs
|
references = nativeBuildInputs ++ buildInputs
|
||||||
++ propagatedNativeBuildInputs ++ propagatedBuildInputs;
|
++ propagatedNativeBuildInputs ++ propagatedBuildInputs;
|
||||||
|
|
||||||
@ -141,10 +147,6 @@ rec {
|
|||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs' =
|
|
||||||
outputs ++
|
|
||||||
(if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []);
|
|
||||||
|
|
||||||
computedSandboxProfile =
|
computedSandboxProfile =
|
||||||
lib.concatMap (input: input.__propagatedSandboxProfile or [])
|
lib.concatMap (input: input.__propagatedSandboxProfile or [])
|
||||||
(stdenv.extraNativeBuildInputs
|
(stdenv.extraNativeBuildInputs
|
||||||
@ -215,10 +217,10 @@ rec {
|
|||||||
++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}";
|
++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}";
|
||||||
|
|
||||||
inherit doCheck doInstallCheck;
|
inherit doCheck doInstallCheck;
|
||||||
|
|
||||||
|
inherit outputs;
|
||||||
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) {
|
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) {
|
||||||
NIX_HARDENING_ENABLE = enabledHardeningOptions;
|
NIX_HARDENING_ENABLE = enabledHardeningOptions;
|
||||||
} // lib.optionalAttrs (outputs' != [ "out" ]) {
|
|
||||||
outputs = outputs';
|
|
||||||
} // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {
|
} // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {
|
||||||
# TODO: remove lib.unique once nix has a list canonicalization primitive
|
# TODO: remove lib.unique once nix has a list canonicalization primitive
|
||||||
__sandboxProfile =
|
__sandboxProfile =
|
||||||
@ -259,9 +261,8 @@ rec {
|
|||||||
# unless they are comfortable with this default.
|
# unless they are comfortable with this default.
|
||||||
outputsToInstall =
|
outputsToInstall =
|
||||||
let
|
let
|
||||||
outs = outputs'; # the value passed to derivation primitive
|
hasOutput = out: builtins.elem out outputs;
|
||||||
hasOutput = out: builtins.elem out outs;
|
in [( lib.findFirst hasOutput null (["bin" "out"] ++ outputs) )];
|
||||||
in [( lib.findFirst hasOutput null (["bin" "out"] ++ outs) )];
|
|
||||||
}
|
}
|
||||||
// attrs.meta or {}
|
// attrs.meta or {}
|
||||||
# Fill `meta.position` to identify the source location of the package.
|
# Fill `meta.position` to identify the source location of the package.
|
||||||
|
Loading…
Reference in New Issue
Block a user