nixpkgs-suyu/pkgs/applications/networking/cluster/kubernetes/default.nix

38 lines
1,018 B
Nix
Raw Normal View History

2014-11-15 17:18:14 +01:00
{ stdenv, fetchFromGitHub, which, go, makeWrapper, iptables,rsync }:
stdenv.mkDerivation rec {
name = "kubernetes-${version}";
2014-11-28 19:51:53 +01:00
version = "v0.5.4";
2014-11-15 17:18:14 +01:00
src = fetchFromGitHub {
owner = "GoogleCloudPlatform";
repo = "kubernetes";
rev = version;
2014-11-28 19:51:53 +01:00
sha256 = "1pipcqpjz9zsi4kfsbdvbbbia642l4xg50pznjw5v061c5xk7vnk";
2014-11-15 17:18:14 +01:00
};
buildInputs = [ makeWrapper which go iptables rsync ];
preBuild = "patchShebangs ./hack";
2014-11-23 01:27:04 +01:00
postBuild = ''go build --ldflags '-extldflags "-static" -s' build/pause/pause.go'';
2014-11-15 17:18:14 +01:00
installPhase = ''
mkdir -p "$out/bin"
cp _output/local/go/bin/* "$out/bin/"
2014-11-23 01:27:04 +01:00
cp pause $out/bin/kube-pause
2014-11-15 17:18:14 +01:00
'';
preFixup = ''
2014-11-23 01:22:11 +01:00
wrapProgram "$out/bin/kube-proxy" --set "PATH" "${iptables}/bin"
2014-11-15 17:18:14 +01:00
'';
meta = with stdenv.lib; {
description = "Open source implementation of container cluster management.";
license = licenses.asl20;
homepage = https://github.com/GoogleCloudPlatform;
maintainers = with maintainers; [offline];
2014-11-30 01:24:59 +01:00
platforms = [ "x86_64-linux" ];
2014-11-15 17:18:14 +01:00
};
}