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

39 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, which, go, makeWrapper, iptables, rsync, utillinux, coreutils }:
2014-11-15 17:18:14 +01:00
stdenv.mkDerivation rec {
name = "kubernetes-${version}";
version = "0.12.1";
2014-11-15 17:18:14 +01:00
src = fetchFromGitHub {
owner = "GoogleCloudPlatform";
repo = "kubernetes";
rev = "v${version}";
sha256 = "1891wpssfp04nkk1h4y3cdgn096b0kq16pc0m2fzilbh3daa6pml";
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 = ''
wrapProgram "$out/bin/kube-proxy" --prefix PATH : "${iptables}/bin"
wrapProgram "$out/bin/kubelet" --prefix PATH : "${utillinux}/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
};
}