lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

go_1_10: init at 1.10 and set as default

Changes are minor from 1.9, so let's just set it as default straight.

+256 -14
+187
pkgs/development/compilers/go/1.10.nix
··· 1 + { stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin 2 + , perl, which, pkgconfig, patch, procps 3 + , pcre, cacert, llvm 4 + , Security, Foundation, bash 5 + , makeWrapper, git, subversion, mercurial, bazaar }: 6 + 7 + let 8 + 9 + inherit (stdenv.lib) optional optionals optionalString; 10 + 11 + clangHack = writeScriptBin "clang" '' 12 + #!${stdenv.shell} 13 + exec ${stdenv.cc}/bin/clang "$@" 2> >(sed '/ld: warning:.*ignoring unexpected dylib file/ d' 1>&2) 14 + ''; 15 + 16 + goBootstrap = runCommand "go-bootstrap" {} '' 17 + mkdir $out 18 + cp -rf ${go_bootstrap}/* $out/ 19 + chmod -R u+w $out 20 + find $out -name "*.c" -delete 21 + cp -rf $out/bin/* $out/share/go/bin/ 22 + ''; 23 + 24 + in 25 + 26 + stdenv.mkDerivation rec { 27 + name = "go-${version}"; 28 + version = "1.10"; 29 + 30 + src = fetchFromGitHub { 31 + owner = "golang"; 32 + repo = "go"; 33 + rev = "go${version}"; 34 + sha256 = "1dzs1mz3zxgg1qyi2lrlxdz1lsvazxvmj9cb69pgqnwjlh3jpw0l"; 35 + }; 36 + 37 + # perl is used for testing go vet 38 + nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ] 39 + ++ optionals stdenv.isLinux [ procps ]; 40 + buildInputs = [ cacert pcre ] 41 + ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] 42 + ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; 43 + propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ]; 44 + 45 + hardeningDisable = [ "all" ]; 46 + 47 + prePatch = '' 48 + patchShebangs ./ # replace /bin/bash 49 + 50 + # This source produces shell script at run time, 51 + # and thus it is not corrected by patchShebangs. 52 + substituteInPlace misc/cgo/testcarchive/carchive_test.go \ 53 + --replace '#!/usr/bin/env bash' '#!${stdenv.shell}' 54 + 55 + # Disabling the 'os/http/net' tests (they want files not available in 56 + # chroot builds) 57 + rm src/net/{listen,parse}_test.go 58 + rm src/syscall/exec_linux_test.go 59 + 60 + # !!! substituteInPlace does not seems to be effective. 61 + # The os test wants to read files in an existing path. Just don't let it be /usr/bin. 62 + sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go 63 + sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go 64 + # Disable the unix socket test 65 + sed -i '/TestShutdownUnix/areturn' src/net/net_test.go 66 + # Disable the hostname test 67 + sed -i '/TestHostname/areturn' src/os/os_test.go 68 + # ParseInLocation fails the test 69 + sed -i '/TestParseInSydney/areturn' src/time/format_test.go 70 + # Remove the api check as it never worked 71 + sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go 72 + # Remove the coverage test as we have removed this utility 73 + sed -i '/TestCoverageWithCgo/areturn' src/cmd/go/go_test.go 74 + # Remove the timezone naming test 75 + sed -i '/TestLoadFixed/areturn' src/time/time_test.go 76 + # Remove disable setgid test 77 + sed -i '/TestRespectSetgidDir/areturn' src/cmd/go/internal/work/build_test.go 78 + # Remove cert tests that conflict with NixOS's cert resolution 79 + sed -i '/TestEnvVars/areturn' src/crypto/x509/root_unix_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.isArm '' 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 + ./remove-test-pie.patch 122 + ./creds-test.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.system == "i686-linux" then "386" 135 + else if stdenv.system == "x86_64-linux" then "amd64" 136 + else if stdenv.isArm then "arm" 137 + else if stdenv.isAarch64 then "arm64" 138 + else throw "Unsupported system"; 139 + GOARM = optionalString (stdenv.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 + # (https://github.com/golang/go/wiki/GoGetTools) 167 + wrapProgram $out/share/go/bin/go --prefix PATH ":" "${stdenv.lib.makeBinPath [ git subversion mercurial bazaar ]}" 168 + ''; 169 + 170 + preFixup = '' 171 + rm -r $out/share/go/pkg/bootstrap 172 + ln -s $out/share/go/bin $out/bin 173 + ''; 174 + 175 + setupHook = ./setup-hook.sh; 176 + 177 + disallowedReferences = [ go_bootstrap ]; 178 + 179 + meta = with stdenv.lib; { 180 + branch = "1.9"; 181 + homepage = http://golang.org/; 182 + description = "The Go Programming language"; 183 + license = licenses.bsd3; 184 + maintainers = with maintainers; [ cstrahan orivej wkennington ]; 185 + platforms = platforms.linux ++ platforms.darwin; 186 + }; 187 + }
+1 -1
pkgs/development/compilers/go/1.9.nix
··· 118 118 patches = 119 119 [ ./remove-tools-1.9.patch 120 120 ./ssl-cert-file-1.9.patch 121 - ./creds-test.patch 121 + ./creds-test-1.9.patch 122 122 ./remove-test-pie-1.9.patch 123 123 ./go-1.9-skip-flaky-19608.patch 124 124 ./go-1.9-skip-flaky-20072.patch
+14
pkgs/development/compilers/go/creds-test-1.9.patch
··· 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 +
+11 -12
pkgs/development/compilers/go/creds-test.patch
··· 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 1 + --- source.org/src/syscall/creds_test.go 1970-01-01 01:00:01.000000000 +0100 2 + +++ source/src/syscall/creds_test.go 2018-02-22 10:43:47.223615358 +0000 3 + @@ -76,8 +76,8 @@ 4 + if sys, ok := err.(*os.SyscallError); ok { 5 + err = sys.Err 6 + } 7 + - if err != syscall.EPERM { 8 + - t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err) 9 + + if err != syscall.EPERM && err != syscall.EINVAL { 10 + + t.Fatalf("WriteMsgUnix failed with %v, want EPERM or EINVAL", err) 11 + } 7 12 } 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 13
+38
pkgs/development/compilers/go/remove-test-pie.patch
··· 1 + --- source.org/src/cmd/dist/test.go 2018-02-22 10:40:40.089632339 +0000 2 + +++ source/src/cmd/dist/test.go 2018-02-22 10:56:53.075193788 +0000 3 + @@ -526,21 +526,6 @@ 4 + }) 5 + } 6 + 7 + - // Test internal linking of PIE binaries where it is supported. 8 + - if goos == "linux" && goarch == "amd64" && !isAlpineLinux() { 9 + - // Issue 18243: We don't have a way to set the default 10 + - // dynamic linker used in internal linking mode. So 11 + - // this test is skipped on Alpine. 12 + - t.tests = append(t.tests, distTest{ 13 + - name: "pie_internal", 14 + - heading: "internal linking of -buildmode=pie", 15 + - fn: func(dt *distTest) error { 16 + - t.addCmd(dt, "src", t.goTest(), "reflect", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60)) 17 + - return nil 18 + - }, 19 + - }) 20 + - } 21 + - 22 + // sync tests 23 + t.tests = append(t.tests, distTest{ 24 + name: "sync_cpu", 25 + @@ -705,11 +690,11 @@ 26 + heading: "API check", 27 + fn: func(dt *distTest) error { 28 + if t.compileOnly { 29 + -return nil 30 + + return nil 31 + t.addCmd(dt, "src", "go", "build", filepath.Join(goroot, "src/cmd/api/run.go")) 32 + return nil 33 + } 34 + -return nil 35 + + return nil 36 + t.addCmd(dt, "src", "go", "run", filepath.Join(goroot, "src/cmd/api/run.go")) 37 + return nil 38 + },
+5 -1
pkgs/top-level/all-packages.nix
··· 6216 6216 inherit (darwin.apple_sdk.frameworks) Security Foundation; 6217 6217 }; 6218 6218 6219 - go = go_1_9; 6219 + go_1_10 = callPackage ../development/compilers/go/1.10.nix { 6220 + inherit (darwin.apple_sdk.frameworks) Security Foundation; 6221 + }; 6222 + 6223 + go = go_1_10; 6220 6224 6221 6225 go-repo-root = callPackage ../development/tools/go-repo-root { }; 6222 6226