about summary refs log tree commit diff
path: root/corepkgs
diff options
context:
space:
mode:
Diffstat (limited to 'corepkgs')
-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"
+  ];
 }