buildDhallUrl: fix impure proxy variable passing (#178544)

PR #177891 tried fixing a problem with `buildDhallUrl` in environments
where proxy variables are necessary for internet access to work.  The
`impureEnvVars` should be set in `downloadEncodedFile` instead of the
final `runCommand`, as the former is an FOD, the latter isn't.
main
Johannes Maier 2 years ago committed by GitHub
parent 73258f3468
commit 39e6ebdfe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      pkgs/development/interpreters/dhall/build-dhall-url.nix

@ -59,6 +59,7 @@ let
outputHash = hash;
name = baseNameOf url;
nativeBuildInputs = [ cacert ];
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
}
''
echo "${url} ${dhallHash}" > in-dhall-file
@ -76,7 +77,7 @@ let
sourceFile = "source.dhall";
in
runCommand name { impureEnvVars = lib.fetchers.proxyImpureEnvVars; }
runCommand name { }
(''
set -eu

Loading…
Cancel
Save