summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2019-02-14 20:32:08 +0100
committerDaiderd Jordan <daiderd@gmail.com>2019-02-14 21:38:08 +0100
commit7ec53a932f314bd9a04ec1e23424e51b26d475bf (patch)
tree2e38d23d170183d7b80bfb1d21d177221ef4133e /pkgs/stdenv
parent3cf2745c3072633cde3f2f27b793152c87bc54fc (diff)
downloadnixpkgs-7ec53a932f314bd9a04ec1e23424e51b26d475bf.tar
nixpkgs-7ec53a932f314bd9a04ec1e23424e51b26d475bf.tar.gz
nixpkgs-7ec53a932f314bd9a04ec1e23424e51b26d475bf.tar.bz2
nixpkgs-7ec53a932f314bd9a04ec1e23424e51b26d475bf.tar.lz
nixpkgs-7ec53a932f314bd9a04ec1e23424e51b26d475bf.tar.xz
nixpkgs-7ec53a932f314bd9a04ec1e23424e51b26d475bf.tar.zst
nixpkgs-7ec53a932f314bd9a04ec1e23424e51b26d475bf.zip
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.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/make-derivation.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix
index cafd1031ab8..3e3bbab40ab 100644
--- a/pkgs/stdenv/generic/make-derivation.nix
+++ b/pkgs/stdenv/generic/make-derivation.nix
@@ -70,6 +70,7 @@ rec {
           else builtins.unsafeGetAttrPos "name" attrs)
     , separateDebugInfo ? false
     , outputs ? [ "out" ]
+    , __darwinAllowLocalNetworking ? false
     , __impureHostDeps ? []
     , __propagatedImpureHostDeps ? []
     , sandboxProfile ? ""
@@ -175,6 +176,7 @@ rec {
         (removeAttrs attrs
           ["meta" "passthru" "pos"
            "checkInputs" "installCheckInputs"
+           "__darwinAllowLocalNetworking"
            "__impureHostDeps" "__propagatedImpureHostDeps"
            "sandboxProfile" "propagatedSandboxProfile"])
         // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
@@ -245,6 +247,7 @@ rec {
         } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) {
           NIX_HARDENING_ENABLE = enabledHardeningOptions;
         } // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {
+          inherit __darwinAllowLocalNetworking;
           # TODO: remove lib.unique once nix has a list canonicalization primitive
           __sandboxProfile =
           let profiles = [ stdenv.extraSandboxProfile ] ++ computedSandboxProfile ++ computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile sandboxProfile ];