3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/cluster/kubernetes/default.nix
2014-11-29 02:27:17 +01:00

38 lines
1,021 B
Nix

{ stdenv, fetchFromGitHub, which, go, makeWrapper, iptables,rsync }:
stdenv.mkDerivation rec {
name = "kubernetes-${version}";
version = "v0.5.2";
src = fetchFromGitHub {
owner = "GoogleCloudPlatform";
repo = "kubernetes";
rev = version;
sha256 = "0nrm59v43jx0cskpd294q946053cfw3y2cgs53ji35dnhgj6fl6w";
};
buildInputs = [ makeWrapper which go iptables rsync ];
preBuild = "patchShebangs ./hack";
postBuild = ''go build --ldflags '-extldflags "-static" -s' build/pause/pause.go'';
installPhase = ''
mkdir -p "$out/bin"
cp _output/local/go/bin/* "$out/bin/"
cp pause $out/bin/kube-pause
'';
preFixup = ''
wrapProgram "$out/bin/kube-proxy" --set "PATH" "${iptables}/bin"
'';
meta = with stdenv.lib; {
description = "Open source implementation of container cluster management.";
license = licenses.asl20;
homepage = https://github.com/GoogleCloudPlatform;
maintainers = with maintainers; [offline];
platforms = with platforms; linux;
};
}