summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJude Taylor <me@jude.bio>2015-11-21 15:51:48 -0800
committerJude Taylor <me@jude.bio>2015-11-21 15:51:48 -0800
commitf5609a4d2ab02a1a39499e78e65ab2ea1f93ff10 (patch)
treed09540bb28f0696524bf79a9e6ea1b08ae40be3e /pkgs
parent69e7f3bb7405ad4bf81e6d8c1897116c3a4d77dc (diff)
downloadnixlib-f5609a4d2ab02a1a39499e78e65ab2ea1f93ff10.tar
nixlib-f5609a4d2ab02a1a39499e78e65ab2ea1f93ff10.tar.gz
nixlib-f5609a4d2ab02a1a39499e78e65ab2ea1f93ff10.tar.bz2
nixlib-f5609a4d2ab02a1a39499e78e65ab2ea1f93ff10.tar.lz
nixlib-f5609a4d2ab02a1a39499e78e65ab2ea1f93ff10.tar.xz
nixlib-f5609a4d2ab02a1a39499e78e65ab2ea1f93ff10.tar.zst
nixlib-f5609a4d2ab02a1a39499e78e65ab2ea1f93ff10.zip
reintroduce impure host deps to all derivations
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/default.nix2
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/CF/default.nix2
-rw-r--r--pkgs/stdenv/generic/default.nix12
3 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix
index f1e3556273e5..7c3d1482f818 100644
--- a/pkgs/os-specific/darwin/apple-sdk/default.nix
+++ b/pkgs/os-specific/darwin/apple-sdk/default.nix
@@ -100,7 +100,7 @@ let
       (allow file-read* (subpath "/System/Library/Frameworks/${name}.framework"))
     '';
 
-    __propagatedImpureHostDeps = "/System/Library/Frameworks/${name}.framework/${name}";
+    __propagatedImpureHostDeps = [ "/System/Library/Frameworks/${name}.framework/${name}" ];
 
     meta = with stdenv.lib; {
       description = "Apple SDK framework ${name}";
diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix
index aededa1a0736..3993a360156a 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix
@@ -8,7 +8,7 @@ appleDerivation {
 
   patches = [ ./add-cf-initialize.patch ./add-cfmachport.patch ./cf-bridging.patch ];
 
-  __propagatedImpureHostDeps = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
+  __propagatedImpureHostDeps = [ "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation" ];
 
   preBuild = ''
     substituteInPlace Makefile \
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 850a27962590..dbb3e25a1472 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -160,6 +160,10 @@ let
             lib.concatMap (input: input.__propagatedSandboxProfile or []) (extraBuildInputs ++ buildInputs ++ nativeBuildInputs);
           computedPropagatedSandboxProfile =
             lib.concatMap (input: input.__propagatedSandboxProfile or []) (propagatedBuildInputs ++ propagatedNativeBuildInputs);
+          computedImpureHostDeps =
+            lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (extraBuildInputs ++ buildInputs ++ nativeBuildInputs));
+          computedPropagatedImpureHostDeps =
+            lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (propagatedBuildInputs ++ propagatedNativeBuildInputs));
         in
         {
           builder = attrs.realBuilder or shell;
@@ -183,6 +187,13 @@ let
               final = lib.concatStringsSep "\n" (lib.filter (x: x != "") (lib.unique profiles));
           in final;
           __propagatedSandboxProfile = lib.unique (computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile ]);
+          __impureHostDeps = computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ __extraImpureHostDeps ++ [
+            "/dev/zero"
+            "/dev/random"
+            "/dev/urandom"
+            "/bin/sh"
+          ];
+          __propagatedImpureHostDeps = computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps;
         } // (if outputs' != [ "out" ] then {
           outputs = outputs';
         } else { })))) (
@@ -220,6 +231,7 @@ let
     }
     // ifDarwin {
       __sandboxProfile = stdenvSandboxProfile;
+      __impureHostDeps = __stdenvImpureHostDeps;
     })
 
     // rec {