lol

go: remove unused expressions for 1.1, 1.2, 1.3

-305
-101
pkgs/development/compilers/go/1.1.nix
··· 1 - { stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc 2 - , removeGodocExternals ? false }: 3 - 4 - let 5 - loader386 = "${glibc.out}/lib/ld-linux.so.2"; 6 - loaderAmd64 = "${glibc.out}/lib/ld-linux-x86-64.so.2"; 7 - loaderArm = "${glibc.out}/lib/ld-linux.so.3"; 8 - in 9 - 10 - stdenv.mkDerivation { 11 - name = "go-1.1.2"; 12 - 13 - src = fetchurl { 14 - url = http://go.googlecode.com/files/go1.1.2.src.tar.gz; 15 - sha256 = "0w7bchhb4b053az3wjp6z342rs9lp9nxf4w2mnfd1b89d6sb7izz"; 16 - }; 17 - 18 - buildInputs = [ bison glibc bash makeWrapper ]; 19 - 20 - NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; 21 - 22 - # I'm not sure what go wants from its 'src', but the go installation manual 23 - # describes an installation keeping the src. 24 - preUnpack = '' 25 - mkdir -p $out/share 26 - cd $out/share 27 - ''; 28 - 29 - prePatch = '' 30 - cd .. 31 - if [ ! -d go ]; then 32 - mv * go 33 - fi 34 - cd go 35 - 36 - patchShebangs ./ # replace /bin/bash 37 - # !!! substituteInPlace does not seems to be effective. 38 - sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c 39 - sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c 40 - sed -i 's,/lib64/ld-linux-x86-64.so.3,${loaderArm},' src/cmd/5l/asm.c 41 - sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go 42 - sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go 43 - 44 - #sed -i -e 's,/bin/cat,${coreutils}/bin/cat,' \ 45 - # -e 's,/bin/echo,${coreutils}/bin/echo,' \ 46 - # src/pkg/exec/exec_test.go 47 - 48 - # Disabling the 'os/http/net' tests (they want files not available in 49 - # chroot builds) 50 - rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} 51 - # The os test wants to read files in an existing path. Just it don't be /usr/bin. 52 - sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go 53 - sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go 54 - # Disable the hostname test 55 - sed -i '/TestHostname/areturn' src/pkg/os/os_test.go 56 - # ParseInLocation fails the test 57 - sed -i '/TestParseInSydney/areturn' src/pkg/time/time_test.go 58 - '' + stdenv.lib.optionalString removeGodocExternals '' 59 - sed -i -e '/googleapi/d' -e '/javascript">$/,+6d' lib/godoc/godoc.html 60 - ''; 61 - 62 - patches = [ ./cacert.patch ]; 63 - 64 - GOOS = "linux"; 65 - GOARCH = if stdenv.system == "i686-linux" then "386" 66 - else if stdenv.system == "x86_64-linux" then "amd64" 67 - else if stdenv.system == "armv5tel-linux" then "arm" 68 - else throw "Unsupported system"; 69 - GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; 70 - 71 - installPhase = '' 72 - mkdir -p "$out/bin" 73 - export GOROOT="$(pwd)/" 74 - export GOBIN="$out/bin" 75 - export PATH="$GOBIN:$PATH" 76 - cd ./src 77 - ./all.bash 78 - cd - 79 - 80 - # Wrap the tools to define the location of the 81 - # libraries. 82 - for a in go gofmt godoc; do 83 - wrapProgram "$out/bin/$a" \ 84 - --set "GOROOT" $out/share/go \ 85 - ${if stdenv.system == "armv5tel-linux" then "--set GOARM $GOARM" else ""} 86 - done 87 - 88 - # Copy the emacs configuration for Go files. 89 - mkdir -p "$out/share/emacs/site-lisp" 90 - cp ./misc/emacs/* $out/share/emacs/site-lisp/ 91 - ''; 92 - 93 - meta = { 94 - branch = "1.1"; 95 - homepage = http://golang.org/; 96 - description = "The Go Programming language"; 97 - license = "BSD"; 98 - maintainers = with stdenv.lib.maintainers; [ pierron viric ]; 99 - platforms = stdenv.lib.platforms.linux; 100 - }; 101 - }
-91
pkgs/development/compilers/go/1.2.nix
··· 1 - { stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc }: 2 - 3 - let 4 - loader386 = "${glibc.out}/lib/ld-linux.so.2"; 5 - loaderAmd64 = "${glibc.out}/lib/ld-linux-x86-64.so.2"; 6 - loaderArm = "${glibc.out}/lib/ld-linux.so.3"; 7 - in 8 - 9 - stdenv.mkDerivation { 10 - name = "go-1.2.2"; 11 - 12 - src = fetchurl { 13 - url = https://storage.googleapis.com/golang/go1.2.2.src.tar.gz; 14 - sha1 = "3ce0ac4db434fc1546fec074841ff40dc48c1167"; 15 - }; 16 - 17 - buildInputs = [ bison glibc bash makeWrapper ]; 18 - 19 - NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; 20 - 21 - # I'm not sure what go wants from its 'src', but the go installation manual 22 - # describes an installation keeping the src. 23 - preUnpack = '' 24 - mkdir -p $out/share 25 - cd $out/share 26 - ''; 27 - 28 - prePatch = '' 29 - cd .. 30 - if [ ! -d go ]; then 31 - mv * go 32 - fi 33 - cd go 34 - 35 - patchShebangs ./ # replace /bin/bash 36 - # !!! substituteInPlace does not seems to be effective. 37 - sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c 38 - sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c 39 - sed -i 's,/lib64/ld-linux-x86-64.so.3,${loaderArm},' src/cmd/5l/asm.c 40 - sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go 41 - sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go 42 - 43 - #sed -i -e 's,/bin/cat,${coreutils}/bin/cat,' \ 44 - # -e 's,/bin/echo,${coreutils}/bin/echo,' \ 45 - # src/pkg/exec/exec_test.go 46 - 47 - # Disabling the 'os/http/net' tests (they want files not available in 48 - # chroot builds) 49 - rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} 50 - # The os test wants to read files in an existing path. Just it don't be /usr/bin. 51 - sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go 52 - sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go 53 - # Disable the hostname test 54 - sed -i '/TestHostname/areturn' src/pkg/os/os_test.go 55 - # ParseInLocation fails the test 56 - sed -i '/TestParseInSydney/areturn' src/pkg/time/time_test.go 57 - ''; 58 - 59 - patches = [ ./cacert-1.2.patch ]; 60 - 61 - GOOS = "linux"; 62 - GOARCH = if stdenv.system == "i686-linux" then "386" 63 - else if stdenv.system == "x86_64-linux" then "amd64" 64 - else if stdenv.system == "armv5tel-linux" then "arm" 65 - else throw "Unsupported system"; 66 - GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; 67 - GO386 = 387; # from Arch: don't assume sse2 on i686 68 - 69 - installPhase = '' 70 - mkdir -p "$out/bin" 71 - export GOROOT="$(pwd)/" 72 - export GOBIN="$out/bin" 73 - export PATH="$GOBIN:$PATH" 74 - cd ./src 75 - ./all.bash 76 - cd - 77 - 78 - # Copy the emacs configuration for Go files. 79 - mkdir -p "$out/share/emacs/site-lisp" 80 - cp ./misc/emacs/* $out/share/emacs/site-lisp/ 81 - ''; 82 - 83 - meta = { 84 - branch = "1.2"; 85 - homepage = http://golang.org/; 86 - description = "The Go Programming language"; 87 - license = "BSD"; 88 - maintainers = with stdenv.lib.maintainers; [ pierron viric ]; 89 - platforms = stdenv.lib.platforms.linux; 90 - }; 91 - }
-113
pkgs/development/compilers/go/1.3.nix
··· 1 - { stdenv, lib, fetchurl, fetchhg, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl }: 2 - 3 - let 4 - loader386 = "${glibc.out}/lib/ld-linux.so.2"; 5 - loaderAmd64 = "${glibc.out}/lib/ld-linux-x86-64.so.2"; 6 - loaderArm = "${glibc.out}/lib/ld-linux.so.3"; 7 - srcs = { 8 - golang = fetchurl { 9 - url = https://storage.googleapis.com/golang/go1.3.3.src.tar.gz; 10 - sha1 = "b54b7deb7b7afe9f5d9a3f5dd830c7dede35393a"; 11 - }; 12 - tools = fetchhg { 13 - url = https://code.google.com/p/go.tools/; 14 - rev = "e1c276c4e679"; 15 - sha256 = "0x62njflwkd99i2ixbksg6mjppl1wfg86f0g3swn350l1h0xzp76"; 16 - }; 17 - }; 18 - in 19 - 20 - stdenv.mkDerivation { 21 - name = "go-1.3.3"; 22 - 23 - src = srcs.golang; 24 - 25 - # perl is used for testing go vet 26 - buildInputs = [ bison bash makeWrapper perl ] ++ lib.optionals stdenv.isLinux [ glibc ] ; 27 - 28 - # I'm not sure what go wants from its 'src', but the go installation manual 29 - # describes an installation keeping the src. 30 - preUnpack = '' 31 - mkdir -p $out/share 32 - cd $out/share 33 - ''; 34 - postUnpack = '' 35 - mkdir -p $out/share/go/src/pkg/code.google.com/p/ 36 - cp -rv --no-preserve=mode,ownership ${srcs.tools} $out/share/go/src/pkg/code.google.com/p/go.tools 37 - ''; 38 - 39 - prePatch = '' 40 - # Ensure that the source directory is named go 41 - cd .. 42 - if [ ! -d go ]; then 43 - mv * go 44 - fi 45 - cd go 46 - patchShebangs ./ # replace /bin/bash 47 - 48 - # Disabling the 'os/http/net' tests (they want files not available in 49 - # chroot builds) 50 - rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} 51 - # !!! substituteInPlace does not seems to be effective. 52 - # The os test wants to read files in an existing path. Just don't let it be /usr/bin. 53 - sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go 54 - sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go 55 - # Disable the unix socket test 56 - sed -i '/TestShutdownUnix/areturn' src/pkg/net/net_test.go 57 - # Disable the hostname test 58 - sed -i '/TestHostname/areturn' src/pkg/os/os_test.go 59 - sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/pkg/net/lookup_unix.go 60 - # ParseInLocation fails the test 61 - sed -i '/TestParseInSydney/areturn' src/pkg/time/format_test.go 62 - '' + lib.optionalString stdenv.isLinux '' 63 - sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/pkg/time/zoneinfo_unix.go 64 - sed -i 's,/lib/ld-linux.so.3,${loaderArm},' src/cmd/5l/asm.c 65 - sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c 66 - sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c 67 - ''; 68 - 69 - patches = [ ./cacert-1.2.patch ]; 70 - 71 - GOOS = if stdenv.isDarwin then "darwin" else "linux"; 72 - GOARCH = if stdenv.isDarwin then "amd64" 73 - else if stdenv.system == "i686-linux" then "386" 74 - else if stdenv.system == "x86_64-linux" then "amd64" 75 - else if stdenv.system == "armv5tel-linux" then "arm" 76 - else throw "Unsupported system"; 77 - GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; 78 - GO386 = 387; # from Arch: don't assume sse2 on i686 79 - CGO_ENABLED = if stdenv.isDarwin then 0 else 1; 80 - 81 - installPhase = '' 82 - export CC=cc 83 - mkdir -p "$out/bin" 84 - unset GOPATH 85 - export GOROOT="$(pwd)/" 86 - export GOBIN="$out/bin" 87 - export PATH="$GOBIN:$PATH" 88 - cd ./src 89 - ./all.bash 90 - cd - 91 - 92 - # Build extra tooling 93 - # TODO: Fix godoc tests 94 - TOOL_ROOT=code.google.com/p/go.tools/cmd 95 - go install -v $TOOL_ROOT/cover $TOOL_ROOT/vet $TOOL_ROOT/godoc 96 - go test -v $TOOL_ROOT/cover $TOOL_ROOT/vet # $TOOL_ROOT/godoc 97 - 98 - # Copy the emacs configuration for Go files. 99 - mkdir -p "$out/share/emacs/site-lisp" 100 - cp ./misc/emacs/* $out/share/emacs/site-lisp/ 101 - ''; 102 - 103 - setupHook = ./setup-hook.sh; 104 - 105 - meta = { 106 - branch = "1.3"; 107 - homepage = http://golang.org/; 108 - description = "The Go Programming language"; 109 - license = "BSD"; 110 - maintainers = with stdenv.lib.maintainers; [ cstrahan ]; 111 - platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; 112 - }; 113 - }