1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/networking/cluster/kubernetes/default.nix

47 lines
1.4 KiB
Nix
Raw Normal View History

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