@@ -0,0 +1,34 @@
1+{ stdenv, fetchFromGitHub, which, go, makeWrapper, iptables,rsync }:
2+
3+stdenv.mkDerivation rec {
4+ name = "kubernetes-${version}";
5+ version = "v0.5.2";
6+
7+ src = fetchFromGitHub {
8+ owner = "GoogleCloudPlatform";
9+ repo = "kubernetes";
10+ rev = version;
11+ sha256 = "0nrm59v43jx0cskpd294q946053cfw3y2cgs53ji35dnhgj6fl6w";
12+ };
13+
14+ buildInputs = [ makeWrapper which go iptables rsync ];
15+
16+ preBuild = "patchShebangs ./hack";
17+
18+ installPhase = ''
19+ mkdir -p "$out/bin"
20+ cp _output/local/go/bin/* "$out/bin/"
21+ '';
22+
23+ preFixup = ''
24+ wrapProgram "$out/bin/proxy" --set "PATH" "${iptables}/bin"
25+ '';
26+
27+ meta = with stdenv.lib; {
28+ description = "Open source implementation of container cluster management.";
29+ license = licenses.asl20;
30+ homepage = https://github.com/GoogleCloudPlatform;
31+ maintainers = with maintainers; [offline];
32+ platforms = with platforms; linux;
33+ };
34+}