go: Include all 3 GOROOT tools
This commit is contained in:
parent
a54eb8d8b2
commit
5e80764774
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc }:
|
{ stdenv, lib, fetchurl, fetchhg, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl }:
|
||||||
|
|
||||||
assert stdenv.gcc.gcc != null;
|
assert stdenv.gcc.gcc != null;
|
||||||
|
|
||||||
@ -6,17 +6,26 @@ let
|
|||||||
loader386 = "${glibc}/lib/ld-linux.so.2";
|
loader386 = "${glibc}/lib/ld-linux.so.2";
|
||||||
loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
|
loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
|
||||||
loaderArm = "${glibc}/lib/ld-linux.so.3";
|
loaderArm = "${glibc}/lib/ld-linux.so.3";
|
||||||
|
srcs = {
|
||||||
|
golang = fetchurl {
|
||||||
|
url = https://storage.googleapis.com/golang/go1.3.1.src.tar.gz;
|
||||||
|
sha256 = "fdfa148cc12f1e4ea45a5565261bf43d8a2e7d1fad4a16aed592d606223b93a8";
|
||||||
|
};
|
||||||
|
tools = fetchhg {
|
||||||
|
url = https://code.google.com/p/go.tools/;
|
||||||
|
rev = "e1c276c4e679";
|
||||||
|
sha256 = "0x62njflwkd99i2ixbksg6mjppl1wfg86f0g3swn350l1h0xzp76";
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "go-1.3.1";
|
name = "go-1.3.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = srcs.golang;
|
||||||
url = https://storage.googleapis.com/golang/go1.3.1.src.tar.gz;
|
|
||||||
sha256 = "fdfa148cc12f1e4ea45a5565261bf43d8a2e7d1fad4a16aed592d606223b93a8";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ bison bash makeWrapper ] ++ lib.optionals stdenv.isLinux [ glibc ] ;
|
# perl is used for testing go vet
|
||||||
|
buildInputs = [ bison bash makeWrapper perl ] ++ lib.optionals stdenv.isLinux [ glibc ] ;
|
||||||
|
|
||||||
# I'm not sure what go wants from its 'src', but the go installation manual
|
# I'm not sure what go wants from its 'src', but the go installation manual
|
||||||
# describes an installation keeping the src.
|
# describes an installation keeping the src.
|
||||||
@ -24,6 +33,10 @@ stdenv.mkDerivation {
|
|||||||
mkdir -p $out/share
|
mkdir -p $out/share
|
||||||
cd $out/share
|
cd $out/share
|
||||||
'';
|
'';
|
||||||
|
postUnpack = ''
|
||||||
|
mkdir -p $out/share/go/src/pkg/code.google.com/p/
|
||||||
|
cp -rv --no-preserve=mode,ownership ${srcs.tools} $out/share/go/src/pkg/code.google.com/p/go.tools
|
||||||
|
'';
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
# Ensure that the source directory is named go
|
# Ensure that the source directory is named go
|
||||||
@ -81,6 +94,12 @@ stdenv.mkDerivation {
|
|||||||
./all.bash
|
./all.bash
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
|
# Build extra tooling
|
||||||
|
# TODO: Fix godoc tests
|
||||||
|
TOOL_ROOT=code.google.com/p/go.tools/cmd
|
||||||
|
go install -v $TOOL_ROOT/cover $TOOL_ROOT/vet $TOOL_ROOT/godoc
|
||||||
|
go test -v $TOOL_ROOT/cover $TOOL_ROOT/vet # $TOOL_ROOT/godoc
|
||||||
|
|
||||||
# Copy the emacs configuration for Go files.
|
# Copy the emacs configuration for Go files.
|
||||||
mkdir -p "$out/share/emacs/site-lisp"
|
mkdir -p "$out/share/emacs/site-lisp"
|
||||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user