anchor.diff:    loader386 = "${glibc}/lib/ld-linux.so.2";
     loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
     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
   
   stdenv.mkDerivation {
     name = "go-1.3.1";
   
  -  src = fetchurl {
  -    url = https://storage.googleapis.com/golang/go1.3.1.src.tar.gz;
  -    sha256 = "fdfa148cc12f1e4ea45a5565261bf43d8a2e7d1fad4a16aed592d606223b93a8";
  -  };
  +  src = srcs.golang;
   
  -  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
     # describes an installation keeping the src.
     preUnpack = ''
       mkdir -p $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 = ''
  
positive.code: { stdenv, lib, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc }:
  
  assert stdenv.gcc.gcc != null;
  
  
negative.code:     ./all.bash
      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.
      mkdir -p "$out/share/emacs/site-lisp"
      cp ./misc/emacs/* $out/share/emacs/site-lisp/
  