buildDhallUrl: Respect proxy environment variables

`buildDhallUrl` is a fixed output derivation, which means
that we can (and should) inherit impure proxy-related
environment variables for fetching URLs.

The motivation for this change is:

https://discourse.dhall-lang.org/t/cant-build-a-nixified-dhall-package-in-a-sandbox-depending-on-the-environment/

… where a `buildDhallUrl` derivation was failing in a restricted
networking environment due to not inheriting proxy-related
settings.
This commit is contained in:
Gabriella Gonzalez 2022-06-16 07:36:17 -07:00 committed by Profpatsch
parent a5051e29e2
commit cb058dc7ea

View File

@ -76,7 +76,8 @@ let
sourceFile = "source.dhall";
in
runCommand name { } (''
runCommand name { impureEnvVars = lib.fetchers.proxyImpureEnvVars; }
(''
set -eu
mkdir -p ${cacheDhall} $out/${cacheDhall}