stdenv: only set __darwinAllowLocalNetworking on darwin
This is a darwin only nix attribute for sandbox builds, it can be ignored on other platforms to avoid unnecessary rebuilds.
This commit is contained in:
parent
3cf2745c30
commit
7ec53a932f
@ -70,6 +70,7 @@ rec {
|
|||||||
else builtins.unsafeGetAttrPos "name" attrs)
|
else builtins.unsafeGetAttrPos "name" attrs)
|
||||||
, separateDebugInfo ? false
|
, separateDebugInfo ? false
|
||||||
, outputs ? [ "out" ]
|
, outputs ? [ "out" ]
|
||||||
|
, __darwinAllowLocalNetworking ? false
|
||||||
, __impureHostDeps ? []
|
, __impureHostDeps ? []
|
||||||
, __propagatedImpureHostDeps ? []
|
, __propagatedImpureHostDeps ? []
|
||||||
, sandboxProfile ? ""
|
, sandboxProfile ? ""
|
||||||
@ -175,6 +176,7 @@ rec {
|
|||||||
(removeAttrs attrs
|
(removeAttrs attrs
|
||||||
["meta" "passthru" "pos"
|
["meta" "passthru" "pos"
|
||||||
"checkInputs" "installCheckInputs"
|
"checkInputs" "installCheckInputs"
|
||||||
|
"__darwinAllowLocalNetworking"
|
||||||
"__impureHostDeps" "__propagatedImpureHostDeps"
|
"__impureHostDeps" "__propagatedImpureHostDeps"
|
||||||
"sandboxProfile" "propagatedSandboxProfile"])
|
"sandboxProfile" "propagatedSandboxProfile"])
|
||||||
// (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
|
// (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
|
||||||
@ -245,6 +247,7 @@ rec {
|
|||||||
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) {
|
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) {
|
||||||
NIX_HARDENING_ENABLE = enabledHardeningOptions;
|
NIX_HARDENING_ENABLE = enabledHardeningOptions;
|
||||||
} // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {
|
} // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {
|
||||||
|
inherit __darwinAllowLocalNetworking;
|
||||||
# TODO: remove lib.unique once nix has a list canonicalization primitive
|
# TODO: remove lib.unique once nix has a list canonicalization primitive
|
||||||
__sandboxProfile =
|
__sandboxProfile =
|
||||||
let profiles = [ stdenv.extraSandboxProfile ] ++ computedSandboxProfile ++ computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile sandboxProfile ];
|
let profiles = [ stdenv.extraSandboxProfile ] ++ computedSandboxProfile ++ computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile sandboxProfile ];
|
||||||
|
Loading…
Reference in New Issue
Block a user