From bb93fa69fa9102df48199c516f3dc72e0c625888 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 31 May 2006 09:52:39 +0000 Subject: [PATCH] * fetchurl: use standard proxy-related variables from the caller such as `http_proxy'. svn path=/nixpkgs/trunk/; revision=5347 --- pkgs/build-support/fetchurl/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 385a0a4c650c..e4a4694404ea 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -23,4 +23,10 @@ stdenv.mkDerivation { if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5; inherit url; + + # 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. + impureEnvVars = ["http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"]; }