From 7cb4e4b343cbffd64cc690d708864a418ac88f83 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Sun, 10 Mar 2019 14:05:44 -0700 Subject: [PATCH] vault: export GOCACHE in the preBuild phase TMPDIR, in `GOCACHE = "$TMPDIR";`, will not be intepreted when it's set outside of a phase. --- pkgs/tools/security/vault/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index 92c757df22c..bf5d34a8dd1 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -13,8 +13,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ go gox removeReferencesTo ]; - GOCACHE="$TMPDIR/go-cache"; - preBuild = '' patchShebangs ./ substituteInPlace scripts/build.sh --replace 'git rev-parse HEAD' 'echo ${src.rev}' @@ -24,6 +22,7 @@ stdenv.mkDerivation rec { ln -s $(pwd) src/github.com/hashicorp/vault export GOPATH=$(pwd) + export GOCACHE="$TMPDIR/go-cache" ''; installPhase = ''