vault: export GOCACHE in the preBuild phase

TMPDIR, in `GOCACHE = "$TMPDIR";`, will not be intepreted  when it's set
outside of a phase.
This commit is contained in:
Wael M. Nasreddine
2019-03-10 14:05:44 -07:00
parent 09435db08a
commit 7cb4e4b343

View File

@@ -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 = ''