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. -.-
This commit is contained in:
Profpatsch
2016-09-17 21:50:01 +02:00
committed by GitHub
parent aa7ab01131
commit 61462c94e6
14 changed files with 29 additions and 72 deletions
+2 -1
View File
@@ -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.
+12
View File
@@ -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"
];
}