new Go support function 'buildGoPackage'
add a setupHook to the Go compiler that builds a GOPATH new buildGoPackage function that overides the phases of stdenv
This commit is contained in:
committed by
Luca Bruno
parent
2d19af84de
commit
faa5dccab8
@@ -81,6 +81,7 @@ stdenv.mkDerivation {
|
||||
installPhase = ''
|
||||
export CC=cc
|
||||
mkdir -p "$out/bin"
|
||||
unset GOPATH
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
@@ -99,6 +100,8 @@ stdenv.mkDerivation {
|
||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
|
||||
@@ -95,6 +95,8 @@ stdenv.mkDerivation {
|
||||
go test -v $TOOL_ROOT/cover $TOOL_ROOT/vet # $TOOL_ROOT/godoc
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
|
||||
5
pkgs/development/compilers/go/setup-hook.sh
Normal file
5
pkgs/development/compilers/go/setup-hook.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
addToGoPath() {
|
||||
addToSearchPath GOPATH $1/share/go
|
||||
}
|
||||
|
||||
envHooks=(${envHooks[@]} addToGoPath)
|
||||
Reference in New Issue
Block a user