Skip to content

Commit

Permalink
builtin:fetchurl: Revert impureEnvVars attribute
Browse files Browse the repository at this point in the history
This was changed in NixOS#10611, which caused the derivation paths of
anything using builtin:fetchurl to change (i.e. all of
Nixpkgs). However, impureEnvVars doesn't actually do anything for
builtin:fetchurl, so we can just set it to its historical value.
  • Loading branch information
edolstra committed May 7, 2024
1 parent b495040 commit d641e8f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/libexpr/fetchurl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,9 @@ derivation ({
# No need to double the amount of network traffic
preferLocalBuild = true;

# This attribute does nothing; it's here to avoid changing evaluation results.
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"
"HTTP_PROXY" "HTTPS_PROXY" "FTP_PROXY" "ALL_PROXY" "NO_PROXY"
];

# To make "nix-prefetch-url" work.
Expand Down

0 comments on commit d641e8f

Please sign in to comment.