2015-03-18 06:26:40 -07:00
|
|
|
{ stdenv, fetchFromGitHub, which, go, makeWrapper, iptables, rsync, utillinux, coreutils }:
|
2014-11-15 08:18:14 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "kubernetes-${version}";
|
2015-06-08 04:10:32 -07:00
|
|
|
version = "0.18.0";
|
2014-11-15 08:18:14 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GoogleCloudPlatform";
|
|
|
|
repo = "kubernetes";
|
2015-03-18 06:26:40 -07:00
|
|
|
rev = "v${version}";
|
2015-06-08 04:10:32 -07:00
|
|
|
sha256 = "1adbd5n2fs1278f6kz6pd23813w2k4pgcxjl21idflh8jafxsyj7";
|
2014-11-15 08:18:14 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper which go iptables rsync ];
|
|
|
|
|
2015-04-25 05:18:05 -07:00
|
|
|
buildPhase = ''
|
2015-06-08 04:10:32 -07:00
|
|
|
GOPATH=$(pwd):$(pwd)/Godeps/_workspace
|
|
|
|
mkdir -p $(pwd)/Godeps/_workspace/src/github.com/GoogleCloudPlatform
|
|
|
|
ln -s $(pwd) $(pwd)/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes
|
|
|
|
|
2015-04-25 05:18:05 -07:00
|
|
|
substituteInPlace "hack/lib/golang.sh" --replace "_cgo" ""
|
|
|
|
patchShebangs ./hack
|
|
|
|
hack/build-go.sh --use_go_build
|
2015-06-08 04:10:32 -07:00
|
|
|
|
|
|
|
(cd cluster/addons/dns/kube2sky && go build ./kube2sky.go)
|
2015-04-25 05:18:05 -07:00
|
|
|
'';
|
2014-11-22 16:27:04 -08:00
|
|
|
|
2014-11-15 08:18:14 -08:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp _output/local/go/bin/* "$out/bin/"
|
2015-06-08 04:10:32 -07:00
|
|
|
cp cluster/addons/dns/kube2sky/kube2sky "$out/bin/"
|
2014-11-15 08:18:14 -08:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
2015-03-18 06:26:40 -07:00
|
|
|
wrapProgram "$out/bin/kube-proxy" --prefix PATH : "${iptables}/bin"
|
|
|
|
wrapProgram "$out/bin/kubelet" --prefix PATH : "${utillinux}/bin"
|
2014-11-15 08:18:14 -08:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-04-28 01:54:58 -07:00
|
|
|
description = "Open source implementation of container cluster management";
|
2014-11-15 08:18:14 -08:00
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = https://github.com/GoogleCloudPlatform;
|
|
|
|
maintainers = with maintainers; [offline];
|
2014-11-29 16:24:59 -08:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2014-11-15 08:18:14 -08:00
|
|
|
};
|
|
|
|
}
|