diff options
author | Profpatsch <mail@profpatsch.de> | 2016-09-17 21:50:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-17 21:50:01 +0200 |
commit | 61462c94e630cdfc6553eb9b0a0b0ad4f85f0b7a (patch) | |
tree | acc82d042348f7e053a473ebc3999062e6b31f1a /lib | |
parent | aa7ab011315069ac4d3d41e2b0ed091b6aa59a7e (diff) | |
download | nixlib-61462c94e630cdfc6553eb9b0a0b0ad4f85f0b7a.tar nixlib-61462c94e630cdfc6553eb9b0a0b0ad4f85f0b7a.tar.gz nixlib-61462c94e630cdfc6553eb9b0a0b0ad4f85f0b7a.tar.bz2 nixlib-61462c94e630cdfc6553eb9b0a0b0ad4f85f0b7a.tar.lz nixlib-61462c94e630cdfc6553eb9b0a0b0ad4f85f0b7a.tar.xz nixlib-61462c94e630cdfc6553eb9b0a0b0ad4f85f0b7a.tar.zst nixlib-61462c94e630cdfc6553eb9b0a0b0ad4f85f0b7a.zip |
lib/fetchers.nix: factor out impure proxy vars (#18702)
Apparently everyone just copied those variables, instead of creating a library constant for them. Some even removed the comment. -.-
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 3 | ||||
-rw-r--r-- | lib/fetchers.nix | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix index 56e002ddc589..cb9a9b0bd4d0 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -31,6 +31,7 @@ let # domain-specific sandbox = import ./sandbox.nix; + fetchers = import ./fetchers.nix; in { inherit trivial @@ -39,7 +40,7 @@ in modules options types licenses platforms systems debug misc - sandbox; + sandbox fetchers; } # !!! don't include everything at top-level; perhaps only the most # commonly used functions. diff --git a/lib/fetchers.nix b/lib/fetchers.nix new file mode 100644 index 000000000000..19d89d6c4074 --- /dev/null +++ b/lib/fetchers.nix @@ -0,0 +1,12 @@ +# snippets that can be shared by mutliple fetchers (pkgs/build-support) +{ + + proxyImpureEnvVars = [ + # We borrow these environment variables from the caller to allow + # easy proxy configuration. This is impure, but a fixed-output + # derivation like fetchurl is allowed to do so since its result is + # by definition pure. + "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy" + ]; + +} |