go: add dependencies for go get
go get expects git, subversion, mercurial and bazaar to be in PATH when needed. (https://github.com/golang/go/wiki/GoGetTools)
This commit is contained in:
parent
4ec09476f2
commit
458895db33
@ -1,7 +1,8 @@
|
|||||||
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
|
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
|
||||||
, perl, which, pkgconfig, patch, fetchpatch
|
, perl, which, pkgconfig, patch, fetchpatch
|
||||||
, pcre, cacert, llvm
|
, pcre, cacert, llvm
|
||||||
, Security, Foundation, bash }:
|
, Security, Foundation, bash
|
||||||
|
, makeWrapper, git, subversion, mercurial, bazaar }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# perl is used for testing go vet
|
# perl is used for testing go vet
|
||||||
nativeBuildInputs = [ perl which pkgconfig patch ];
|
nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ];
|
||||||
buildInputs = [ pcre ]
|
buildInputs = [ pcre ]
|
||||||
++ optionals stdenv.isLinux [ stdenv.glibc.out stdenv.glibc.static ];
|
++ optionals stdenv.isLinux [ stdenv.glibc.out stdenv.glibc.static ];
|
||||||
propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ];
|
propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ];
|
||||||
@ -148,6 +149,9 @@ stdenv.mkDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
cp -r . $GOROOT
|
cp -r . $GOROOT
|
||||||
( cd $GOROOT/src && ./all.bash )
|
( cd $GOROOT/src && ./all.bash )
|
||||||
|
|
||||||
|
# (https://github.com/golang/go/wiki/GoGetTools)
|
||||||
|
wrapProgram $out/share/go/bin/go --prefix PATH ":" "${stdenv.lib.makeBinPath [ git subversion mercurial bazaar ]}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user