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:
+2
-1
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user