From 458895db332d394bfadc05404a020ea0b4b1ee7f Mon Sep 17 00:00:00 2001 From: Willi Butz Date: Thu, 11 May 2017 17:46:17 +0200 Subject: 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) --- pkgs/development/compilers/go/1.8.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pkgs/development/compilers') diff --git a/pkgs/development/compilers/go/1.8.nix b/pkgs/development/compilers/go/1.8.nix index 0be559da79c6..24a40ca0ba0c 100644 --- a/pkgs/development/compilers/go/1.8.nix +++ b/pkgs/development/compilers/go/1.8.nix @@ -1,7 +1,8 @@ { stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin , perl, which, pkgconfig, patch, fetchpatch , pcre, cacert, llvm -, Security, Foundation, bash }: +, Security, Foundation, bash +, makeWrapper, git, subversion, mercurial, bazaar }: let @@ -34,7 +35,7 @@ stdenv.mkDerivation rec { }; # perl is used for testing go vet - nativeBuildInputs = [ perl which pkgconfig patch ]; + nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ]; buildInputs = [ pcre ] ++ optionals stdenv.isLinux [ stdenv.glibc.out stdenv.glibc.static ]; propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ]; @@ -148,6 +149,9 @@ stdenv.mkDerivation rec { installPhase = '' cp -r . $GOROOT ( 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 = '' -- cgit 1.4.1