From cb058dc7ea65b3f853672386433ca628a1fced1f Mon Sep 17 00:00:00 2001 From: Gabriella Gonzalez Date: Thu, 16 Jun 2022 07:36:17 -0700 Subject: [PATCH] buildDhallUrl: Respect proxy environment variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. --- 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 766fe3c1c2e3..9dcd885d25c3 100644 --- a/pkgs/development/interpreters/dhall/build-dhall-url.nix +++ b/pkgs/development/interpreters/dhall/build-dhall-url.nix @@ -76,7 +76,8 @@ let sourceFile = "source.dhall"; in - runCommand name { } ('' + runCommand name { impureEnvVars = lib.fetchers.proxyImpureEnvVars; } + ('' set -eu mkdir -p ${cacheDhall} $out/${cacheDhall}