@@ -2,25 +2,27 @@
22
33stdenv.mkDerivation rec {
44 name = "kubernetes-${version}";
5− version = "0.12.1";
5+ version = "0.15.0";
66
77 src = fetchFromGitHub {
88 owner = "GoogleCloudPlatform";
99 repo = "kubernetes";
1010 rev = "v${version}";
11− sha256 = "1891wpssfp04nkk1h4y3cdgn096b0kq16pc0m2fzilbh3daa6pml";
11+ sha256 = "1jiczhx01i8czm1gzd232z2ds2f1lvs5ifa9zjabhzw5ykfzdjg8";
1212 };
1313
1414 buildInputs = [ makeWrapper which go iptables rsync ];
1515
16− preBuild = "patchShebangs ./hack";
17−
18− postBuild = ''go build --ldflags '-extldflags "-static" -s' build/pause/pause.go'';
16+ buildPhase = ''
17+ substituteInPlace "hack/lib/golang.sh" --replace "_cgo" ""
18+ GOPATH=$(pwd)
19+ patchShebangs ./hack
20+ hack/build-go.sh --use_go_build
21+ '';
1922
2023 installPhase = ''
2124 mkdir -p "$out/bin"
2225 cp _output/local/go/bin/* "$out/bin/"
23− cp pause $out/bin/kube-pause
2426 '';
2527
2628 preFixup = ''