about summary refs log tree commit diff
path: root/corepkgs/fetchurl.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-07-16T05·11-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-16T09·21+0200
commit048be62484537633e2523dd4d200619649ff860d (patch)
tree1b3fb84b489a5d9efa47f009bfdb7cff4836feff /corepkgs/fetchurl.nix
parenta2c85b2ef85a34bf8e5238c315a4ca73606f5ae6 (diff)
Pass *_proxy vars to bootstrap fetchurl
Diffstat (limited to 'corepkgs/fetchurl.nix')
-rw-r--r--corepkgs/fetchurl.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/corepkgs/fetchurl.nix b/corepkgs/fetchurl.nix
index 39b9dd5082e3..4faedb14062a 100644
--- a/corepkgs/fetchurl.nix
+++ b/corepkgs/fetchurl.nix
@@ -34,4 +34,12 @@ derivation {
 
   # Don't build in a chroot because Nix's dependencies may not be there.
   __noChroot = true;
+
+  impureEnvVars = [
+    # 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"
+  ];
 }