From 39e6ebdfe1552028cd33eec26678a54d2f848f52 Mon Sep 17 00:00:00 2001 From: Johannes Maier Date: Wed, 22 Jun 2022 18:06:54 +0200 Subject: [PATCH] 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. --- pkgs/development/interpreters/dhall/build-dhall-url.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/dhall/build-dhall-url.nix b/pkgs/development/interpreters/dhall/build-dhall-url.nix index 9dcd885d25c3..6d7103f78e6f 100644 --- a/pkgs/development/interpreters/dhall/build-dhall-url.nix +++ b/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