diff options
author | Jude Taylor <me@jude.bio> | 2015-06-11 17:58:26 -0700 |
---|---|---|
committer | Jude Taylor <me@jude.bio> | 2015-06-18 12:37:41 -0700 |
commit | fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c (patch) | |
tree | 3488761b783cedf8a7c90f1a51c1435430c35cd4 /pkgs/stdenv/generic/default.nix | |
parent | 5e63669520dc1ac22a16ddd7fef468f38ca0b221 (diff) | |
download | nixpkgs-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar nixpkgs-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.gz nixpkgs-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.bz2 nixpkgs-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.lz nixpkgs-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.xz nixpkgs-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.zst nixpkgs-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.zip |
pure darwin stdenv
Diffstat (limited to 'pkgs/stdenv/generic/default.nix')
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 863acc31a61..67adaf42a8d 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -10,6 +10,8 @@ let lib = import ../../../lib; in lib.makeOverridable ( , setupScript ? ./setup.sh , extraBuildInputs ? [] +, __stdenvImpureHostDeps ? [] +, __extraImpureHostDeps ? [] }: let @@ -131,7 +133,19 @@ let lib.addPassthru (derivation ( (removeAttrs attrs ["meta" "passthru" "crossAttrs" "pos"]) - // + // (let + buildInputs = attrs.buildInputs or []; + nativeBuildInputs = attrs.nativeBuildInputs or []; + propagatedBuildInputs = attrs.propagatedBuildInputs or []; + propagatedNativeBuildInputs = attrs.propagatedNativeBuildInputs or []; + crossConfig = attrs.crossConfig or null; + + __impureHostDeps = attrs.__impureHostDeps or []; + __propagatedImpureHostDeps = attrs.__propagatedImpureHostDeps or []; + + computedImpureHostDeps = lib.concatMap (input: input.__propagatedImpureHostDeps or []) (extraBuildInputs ++ buildInputs ++ nativeBuildInputs); + computedPropagatedImpureHostDeps = lib.concatMap (input: input.__propagatedImpureHostDeps or []) (propagatedBuildInputs ++ propagatedNativeBuildInputs); + in { builder = attrs.realBuilder or shell; args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; @@ -147,7 +161,15 @@ let nativeBuildInputs = nativeBuildInputs ++ (if crossConfig == null then buildInputs else []); propagatedNativeBuildInputs = propagatedNativeBuildInputs ++ (if crossConfig == null then propagatedBuildInputs else []); - })) ( + + __impureHostDeps = lib.unique (lib.sort (x: y: x < y) (computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ __extraImpureHostDeps ++ [ + "/dev/zero" + "/dev/random" + "/dev/urandom" + "/bin/sh" + ])); + __propagatedImpureHostDeps = lib.unique (lib.sort (x: y: x < y) (computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps)); + }))) ( { # The meta attribute is passed in the resulting attribute set, # but it's not part of the actual derivation, i.e., it's not @@ -171,6 +193,7 @@ let (if isNull allowedRequisites then {} else { allowedRequisites = allowedRequisites ++ defaultNativeBuildInputs; }) // { inherit system name; + __impureHostDeps = __stdenvImpureHostDeps; builder = shell; |