From d78141a886383c38afb9fb294eec6fac0b74986e Mon Sep 17 00:00:00 2001 From: Carlos D Date: Fri, 14 Feb 2020 16:11:22 +1100 Subject: [PATCH] Pass through http proxy env vars in pure shell --- src/nix-build/nix-build.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 205165a4c..e602ea555 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -97,7 +97,11 @@ static void _main(int argc, char * * argv) std::string outLink = "./result"; // List of environment variables kept for --pure - std::set keepVars{"HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL", "TZ", "PAGER", "NIX_BUILD_SHELL", "SHLVL"}; + std::set keepVars{ + "HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", + "IN_NIX_SHELL", "TZ", "PAGER", "NIX_BUILD_SHELL", "SHLVL", + "http_proxy", "https_proxy", "ftp_proxy", "all_proxy", "no_proxy" + }; Strings args; for (int i = 1; i < argc; ++i)