···1+diff --git a/src/go/build/build.go b/src/go/build/build.go
2+index b68a712..b60bf19 100644
3+--- a/src/go/build/build.go
4++++ b/src/go/build/build.go
5+@@ -1708,7 +1708,7 @@ func init() {
6+ }
7+8+ // ToolDir is the directory containing build tools.
9+-var ToolDir = getToolDir()
10++var ToolDir = runtime.GOTOOLDIR()
11+12+ // IsLocalImport reports whether the import path is
13+ // a local import path, like ".", "..", "./foo", or "../foo".
14+diff --git a/src/runtime/extern.go b/src/runtime/extern.go
15+index 7171b13..18a942c 100644
16+--- a/src/runtime/extern.go
17++++ b/src/runtime/extern.go
18+@@ -229,6 +229,17 @@ func GOROOT() string {
19+ return sys.DefaultGoroot
20+ }
21+22++// GOTOOLDIR returns the root of the Go tree.
23++// It uses the GOTOOLDIR environment variable, if set,
24++// or else the root used during the Go build.
25++func GOTOOLDIR() string {
26++ s := gogetenv("GOTOOLDIR")
27++ if s != "" {
28++ return s
29++ }
30++ return GOROOT() + "/pkg/tool/" + GOOS + "_" + GOARCH
31++}
32++
33+ // Version returns the Go tree's version string.
34+ // It is either the commit hash and date at the time of the build or,
35+ // when possible, a release tag like "go1.3".
···1+diff --git a/src/os/signal/signal_test.go b/src/os/signal/signal_test.go
2+index 3d79c7a..6e0f7b4 100644
3+--- a/src/os/signal/signal_test.go
4++++ b/src/os/signal/signal_test.go
5+@@ -217,6 +217,8 @@ var checkSighupIgnored = flag.Bool("check_sighup_ignored", false, "if true, Test
6+7+ // Test that Ignored(SIGHUP) correctly detects whether it is being run under nohup.
8+ func TestDetectNohup(t *testing.T) {
9++ t.Skip("Fails in nix build environment")
10++
11+ if *checkSighupIgnored {
12+ if !Ignored(syscall.SIGHUP) {
13+ t.Fatal("SIGHUP is not ignored.")
14+@@ -306,6 +308,8 @@ func TestStop(t *testing.T) {
15+ // Test that when run under nohup, an uncaught SIGHUP does not kill the program,
16+ // but a
17+ func TestNohup(t *testing.T) {
18++ t.Skip("Fails in nix build environment")
19++
20+ // Ugly: ask for SIGHUP so that child will not have no-hup set
21+ // even if test is running under nohup environment.
22+ // We have no intention of reading from c.