Merge pull request #57296 from kalbasit/nixpkgs_go-fixes

Fixes to a few Go packages.
This commit is contained in:
Wael Nasreddine 2019-03-11 13:11:11 -07:00 committed by GitHub
commit c75cb87721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 11 deletions

View File

@ -13,11 +13,11 @@ stdenv.mkDerivation rec {
buildInputs = [ ruby bundler go ];
GOCACHE="$TMPDIR/go-cache";
patches = [ ./remove-hardcoded-locations.patch ];
installPhase = ''
export GOCACHE="$TMPDIR/go-cache"
ruby bin/compile
mkdir -p $out/
cp -R . $out/

View File

@ -94,13 +94,14 @@ rec {
dontStrip = true;
buildPhase = (optionalString (stdenv.isLinux) ''
buildPhase = ''
export GOCACHE="$TMPDIR/go-cache"
'' + (optionalString (stdenv.isLinux) ''
# build engine
cd ./components/engine
export AUTO_GOPATH=1
export DOCKER_GITCOMMIT="${rev}"
export VERSION="${version}"
export GOCACHE="$TMPDIR/go-cache"
./hack/make.sh dynbinary
cd -
'') + ''

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
makeFlags = [
"PREFIX=$(out)"
"GOCACHE=$TMPDIR/go-cache"
"GOCACHE=$(TMPDIR)/go-cache"
];
passthru.updateScript = deepin.updateScript { inherit name; };

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
makeFlags = [
"PREFIX=$(out)"
"GOCACHE=$TMPDIR/go-cache"
"GOCACHE=$(TMPDIR)/go-cache"
];
passthru.updateScript = deepin.updateScript { inherit name; };

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = "-Wno-error";
GOCACHE="$TMPDIR/go-cache";
makeFlags = [ "GOCACHE=$(TMPDIR)/go-cache" ];
installPhase = ''
mkdir -p $out/bin $out/include $out/lib

View File

@ -13,9 +13,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ go ];
GOCACHE="$TMPDIR/go-cache";
buildPhase = ''
export GOCACHE="$TMPDIR/go-cache"
mkdir -p Godeps/_workspace/src/github.com/google/
ln -s $(pwd) Godeps/_workspace/src/github.com/google/cadvisor
GOPATH=$(pwd)/Godeps/_workspace go build -v -o cadvisor github.com/google/cadvisor

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