first you need a previous version of the compiler
$ nix-env -i go
exporting this allows go's build system to find our compiler
$ GOBIN=$(dirname $(readlink -f $(which go)))
$ GOROOT_BOOTSTRAP=$GOBIN/../share/go
then you can continue to build go as usual
$ git clone https://github.com/golang/go.git
$ cd go/src
$ ./make.bash
to use it set the following
$ export GOROOT=$(readlink go)
$ export PATH=$GOROOT/bin:$PATH