git.iko.soy/typeable/nixpkgs
on master help sign in
go_1_9: Drop go 1.9
affee8aadisbladis
pkgs/development/compilers/go/1.9.nixdeleted−185
@@ -1,185 +0,0 @@
1−{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
2−, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation }:
3−
4−let
5−
6− inherit (stdenv.lib) optionals optionalString;
7−
8− clangHack = writeScriptBin "clang" ''
9− #!${stdenv.shell}
10− exec ${stdenv.cc}/bin/clang "$@" 2> >(sed '/ld: warning:.*ignoring unexpected dylib file/ d' 1>&2)
11− '';
12−
13− goBootstrap = runCommand "go-bootstrap" {} ''
14− mkdir $out
15− cp -rf ${go_bootstrap}/* $out/
16− chmod -R u+w $out
17− find $out -name "*.c" -delete
18− cp -rf $out/bin/* $out/share/go/bin/
19− '';
20−
21−in
22−
23−stdenv.mkDerivation rec {
24− name = "go-${version}";
25− version = "1.9.5";
26−
27− src = fetchFromGitHub {
28− owner = "golang";
29− repo = "go";
30− rev = "go${version}";
31− sha256 = "15dx1b71xv7b265gqk9nv02pirggpw7d83apikhrza2qkj64ydd0";
32− };
33−
34− # perl is used for testing go vet
35− nativeBuildInputs = [ perl which pkgconfig patch procps ];
36− buildInputs = [ cacert pcre ]
37− ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ]
38− ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
39− propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ];
40−
41− hardeningDisable = [ "all" ];
42−
43− prePatch = ''
44− patchShebangs ./ # replace /bin/bash
45−
46− # This source produces shell script at run time,
47− # and thus it is not corrected by patchShebangs.
48− substituteInPlace misc/cgo/testcarchive/carchive_test.go \
49− --replace '#!/usr/bin/env bash' '#!${stdenv.shell}'
50−
51− # Disabling the 'os/http/net' tests (they want files not available in
52− # chroot builds)
53− rm src/net/{listen,parse}_test.go
54− rm src/syscall/exec_linux_test.go
55−
56− # !!! substituteInPlace does not seems to be effective.
57− # The os test wants to read files in an existing path. Just don't let it be /usr/bin.
58− sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
59− sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
60− # Disable the unix socket test
61− sed -i '/TestShutdownUnix/areturn' src/net/net_test.go
62− # Disable the hostname test
63− sed -i '/TestHostname/areturn' src/os/os_test.go
64− # ParseInLocation fails the test
65− sed -i '/TestParseInSydney/areturn' src/time/format_test.go
66− # Remove the api check as it never worked
67− sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
68− # Remove the coverage test as we have removed this utility
69− sed -i '/TestCoverageWithCgo/areturn' src/cmd/go/go_test.go
70− # Remove the timezone naming test
71− sed -i '/TestLoadFixed/areturn' src/time/time_test.go
72− # Remove disable setgid test
73− sed -i '/TestRespectSetgidDir/areturn' src/cmd/go/internal/work/build_test.go
74− # Remove cert tests that conflict with NixOS's cert resolution
75− sed -i '/TestEnvVars/areturn' src/crypto/x509/root_unix_test.go
76− # TestWritevError hangs sometimes
77− sed -i '/TestWritevError/areturn' src/net/writev_test.go
78− # TestVariousDeadlines fails sometimes
79− sed -i '/TestVariousDeadlines/areturn' src/net/timeout_test.go
80−
81− sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
82− sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
83−
84− # Disable cgo lookup tests not works, they depend on resolver
85− rm src/net/cgo_unix_test.go
86−
87− '' + optionalString stdenv.isLinux ''
88− sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
89− '' + optionalString stdenv.isAarch32 ''
90− sed -i '/TestCurrent/areturn' src/os/user/user_test.go
91− echo '#!${stdenv.shell}' > misc/cgo/testplugin/test.bash
92− '' + optionalString stdenv.isDarwin ''
93− substituteInPlace src/race.bash --replace \
94− "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
95− sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
96− sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
97− sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
98−
99− sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
100− sed -i '/TestCredentialNoSetGroups/areturn' src/os/exec/exec_posix_test.go
101− sed -i '/TestCurrent/areturn' src/os/user/user_test.go
102− sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
103− sed -i '/TestRead0/areturn' src/os/os_test.go
104− sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
105−
106− sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
107− sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go
108−
109− sed -i '/TestDisasmExtld/areturn' src/cmd/objdump/objdump_test.go
110−
111− sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
112−
113− touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
114−
115− sed -i '1 a\exit 0' misc/cgo/errors/test.bash
116− '';
117−
118− patches =
119− [ ./remove-tools-1.9.patch
120− ./ssl-cert-file-1.9.patch
121− ./creds-test-1.9.patch
122− ./remove-test-pie-1.9.patch
123− ./go-1.9-skip-flaky-19608.patch
124− ./go-1.9-skip-flaky-20072.patch
125− ];
126−
127− postPatch = optionalString stdenv.isDarwin ''
128− echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
129− substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
130− '';
131−
132− GOOS = if stdenv.isDarwin then "darwin" else "linux";
133− GOARCH = if stdenv.isDarwin then "amd64"
134− else if stdenv.hostPlatform.system == "i686-linux" then "386"
135− else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
136− else if stdenv.isAarch32 then "arm"
137− else if stdenv.isAarch64 then "arm64"
138− else throw "Unsupported system";
139− GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
140− GO386 = 387; # from Arch: don't assume sse2 on i686
141− CGO_ENABLED = 1;
142− GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
143− # Hopefully avoids test timeouts on Hydra
144− GO_TEST_TIMEOUT_SCALE = 3;
145−
146− # The go build actually checks for CC=*/clang and does something different, so we don't
147− # just want the generic `cc` here.
148− CC = if stdenv.isDarwin then "clang" else "cc";
149−
150− configurePhase = ''
151− mkdir -p $out/share/go/bin
152− export GOROOT=$out/share/go
153− export GOBIN=$GOROOT/bin
154− export PATH=$GOBIN:$PATH
155− ulimit -a
156− '';
157−
158− postConfigure = optionalString stdenv.isDarwin ''
159− export PATH=${clangHack}/bin:$PATH
160− '';
161−
162− installPhase = ''
163− cp -r . $GOROOT
164− ( cd $GOROOT/src && ./all.bash )
165− '';
166−
167− preFixup = ''
168− rm -r $out/share/go/pkg/bootstrap
169− ln -s $out/share/go/bin $out/bin
170− '';
171−
172− setupHook = ./setup-hook.sh;
173−
174− disallowedReferences = [ go_bootstrap ];
175−
176− meta = with stdenv.lib; {
177− knownVulnerabilities = [ "CVE-2019-6486" ];
178− branch = "1.9";
179− homepage = http://golang.org/;
180− description = "The Go Programming language";
181− license = licenses.bsd3;
182− maintainers = with maintainers; [ cstrahan orivej ];
183− platforms = platforms.linux ++ platforms.darwin;
184− };
185−}
pkgs/development/compilers/go/creds-test-1.9.patchdeleted−14
@@ -1,14 +0,0 @@
1−diff -ru -x '*~' ./result/src/syscall/creds_test.go go-go1.7.4-src/src/syscall/creds_test.go
2−--- ./result/src/syscall/creds_test.go 1970-01-01 01:00:01.000000000 +0100
3−+++ go-go1.7.4-src/src/syscall/creds_test.go 2016-12-21 14:06:39.559932164 +0100
4−@@ -62,8 +62,8 @@
5− if sys, ok := err.(*os.SyscallError); ok {
6− err = sys.Err
7− }
8−- if err != syscall.EPERM {
9−- t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
10−+ if err != syscall.EPERM && err != syscall.EINVAL {
11−+ t.Fatalf("WriteMsgUnix failed with %v, want EPERM or EINVAL", err)
12− }
13− }
14−
pkgs/development/compilers/go/remove-test-pie-1.9.patchdeleted−26
@@ -1,26 +0,0 @@
1−diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
2−index 73432d31ea..3310f5298d 100644
3−--- a/src/cmd/dist/test.go
4−+++ b/src/cmd/dist/test.go
5−@@ -510,21 +510,6 @@ func (t *tester) registerTests() {
6− })
7− }
8−
9−- // Test internal linking of PIE binaries where it is supported.
10−- if t.goos == "linux" && t.goarch == "amd64" && !isAlpineLinux() {
11−- // Issue 18243: We don't have a way to set the default
12−- // dynamic linker used in internal linking mode. So
13−- // this test is skipped on Alpine.
14−- t.tests = append(t.tests, distTest{
15−- name: "pie_internal",
16−- heading: "internal linking of -buildmode=pie",
17−- fn: func(dt *distTest) error {
18−- t.addCmd(dt, "src", "go", "test", "reflect", "-short", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60), t.tags(), t.runFlag(""))
19−- return nil
20−- },
21−- })
22−- }
23−-
24− // sync tests
25− t.tests = append(t.tests, distTest{
26− name: "sync_cpu",
pkgs/top-level/all-packages.nix−7
@@ -7058,10 +7058,6 @@ in
7058 inherit (darwin.apple_sdk.frameworks) Security;
7058 inherit (darwin.apple_sdk.frameworks) Security;
7059 };
7059 };
7060
7060
7061− go_1_9 = callPackage ../development/compilers/go/1.9.nix {
7062− inherit (darwin.apple_sdk.frameworks) Security Foundation;
7063− };
7064−
7065 go_1_10 = callPackage ../development/compilers/go/1.10.nix {
7061 go_1_10 = callPackage ../development/compilers/go/1.10.nix {
7066 inherit (darwin.apple_sdk.frameworks) Security Foundation;
7062 inherit (darwin.apple_sdk.frameworks) Security Foundation;
7067 };
7063 };
@@ -13234,9 +13230,6 @@ in
13234
13230
13235 ### DEVELOPMENT / GO MODULES
13231 ### DEVELOPMENT / GO MODULES
13236
13232
13237− buildGo19Package = callPackage ../development/go-modules/generic {
13238− go = buildPackages.go_1_9;
13239− };
13240 buildGo110Package = callPackage ../development/go-modules/generic {
13233 buildGo110Package = callPackage ../development/go-modules/generic {
13241 go = buildPackages.go_1_10;
13234 go = buildPackages.go_1_10;
13242 };
13235 };