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

76 lines
2.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, removeReferencesTo, which, go_1_9, go-bindata, makeWrapper, rsync
2016-10-10 16:48:00 +00:00
, components ? [
2017-01-23 20:13:31 +00:00
"cmd/kubeadm"
2016-10-10 16:48:00 +00:00
"cmd/kubectl"
"cmd/kubelet"
"cmd/kube-apiserver"
"cmd/kube-controller-manager"
"cmd/kube-proxy"
2018-03-30 23:16:32 +00:00
"cmd/kube-scheduler"
2017-09-08 23:59:33 +00:00
"test/e2e/e2e.test"
2016-10-10 16:48:00 +00:00
]
}:
with lib;
2014-11-15 16:18:14 +00:00
stdenv.mkDerivation rec {
name = "kubernetes-${version}";
kubernetes: 1.10.4 -> 1.10.5 (#42498) Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/kubernetes/versions. These checks were done: - built on NixOS - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/.kube-addons-wrapped had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-addons had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/conversion-gen had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/deepcopy-gen had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/defaulter-gen had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/e2e.test had a zero exit code or showed the expected version - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/gendocs passed the binary check. - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/genkubedocs had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/genman had a zero exit code or showed the expected version - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/genyaml passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/go-bindata passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-apiserver passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-controller-manager passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-proxy passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-scheduler passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kubeadm passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kubectl passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kubelet passed the binary check. - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/openapi-gen had a zero exit code or showed the expected version - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/teststale passed the binary check. - 11 of 20 passed binary check by having a zero exit code. - 5 of 20 passed binary check by having the new version present in output. - found 1.10.5 with grep in /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5 - directory tree listing: https://gist.github.com/f66eb35eb29445af12d98c6605753493 - du listing: https://gist.github.com/30b38d2640ef11a2252df16c7bfd6063
2018-06-24 18:16:38 +00:00
version = "1.10.5";
2014-11-15 16:18:14 +00:00
src = fetchFromGitHub {
2016-06-06 10:58:51 +00:00
owner = "kubernetes";
2014-11-15 16:18:14 +00:00
repo = "kubernetes";
rev = "v${version}";
kubernetes: 1.10.4 -> 1.10.5 (#42498) Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/kubernetes/versions. These checks were done: - built on NixOS - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/.kube-addons-wrapped had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-addons had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/conversion-gen had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/deepcopy-gen had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/defaulter-gen had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/e2e.test had a zero exit code or showed the expected version - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/gendocs passed the binary check. - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/genkubedocs had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/genman had a zero exit code or showed the expected version - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/genyaml passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/go-bindata passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-apiserver passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-controller-manager passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-proxy passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kube-scheduler passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kubeadm passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kubectl passed the binary check. - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/kubelet passed the binary check. - Warning: no invocation of /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/openapi-gen had a zero exit code or showed the expected version - /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5/bin/teststale passed the binary check. - 11 of 20 passed binary check by having a zero exit code. - 5 of 20 passed binary check by having the new version present in output. - found 1.10.5 with grep in /nix/store/wvgp2pcmxsvzxvbl0a4w0qmwgkw2nifq-kubernetes-1.10.5 - directory tree listing: https://gist.github.com/f66eb35eb29445af12d98c6605753493 - du listing: https://gist.github.com/30b38d2640ef11a2252df16c7bfd6063
2018-06-24 18:16:38 +00:00
sha256 = "1k6ayb43l68l0qw31cc4k1pwvm8aks3l2xm0gdxdxbbww1mnzix2";
2014-11-15 16:18:14 +00:00
};
# Build using golang v1.9 in accordance with https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.10.md#external-dependencies
buildInputs = [ removeReferencesTo makeWrapper which go_1_9 rsync go-bindata ];
2014-11-15 16:18:14 +00:00
outputs = ["out" "man" "pause"];
2016-10-10 16:48:00 +00:00
postPatch = ''
2015-04-25 12:18:05 +00:00
substituteInPlace "hack/lib/golang.sh" --replace "_cgo" ""
substituteInPlace "hack/generate-docs.sh" --replace "make" "make SHELL=${stdenv.shell}"
# hack/update-munge-docs.sh only performs some tests on the documentation.
# They broke building k8s; disabled for now.
echo "true" > "hack/update-munge-docs.sh"
2015-04-25 12:18:05 +00:00
patchShebangs ./hack
'';
2014-11-23 00:27:04 +00:00
2016-10-10 16:48:00 +00:00
WHAT="--use_go_build ${concatStringsSep " " components}";
postBuild = ''
./hack/generate-docs.sh
(cd build/pause && cc pause.c -o pause)
'';
2016-10-10 16:48:00 +00:00
2014-11-15 16:18:14 +00:00
installPhase = ''
2018-03-31 14:37:32 +00:00
mkdir -p "$out/bin" "$out/share/bash-completion/completions" "$out/share/zsh/site-functions" "$man/share/man" "$pause/bin"
2016-10-10 16:48:00 +00:00
cp _output/local/go/bin/* "$out/bin/"
cp build/pause/pause "$pause/bin/pause"
2016-10-10 16:48:00 +00:00
cp -R docs/man/man1 "$man/share/man"
2016-12-11 13:56:25 +00:00
2017-09-01 10:08:11 +00:00
cp cluster/addons/addon-manager/kube-addons.sh $out/bin/kube-addons
patchShebangs $out/bin/kube-addons
wrapProgram $out/bin/kube-addons --set "KUBECTL_BIN" "$out/bin/kubectl"
2016-12-11 13:56:25 +00:00
$out/bin/kubectl completion bash > $out/share/bash-completion/completions/kubectl
2018-03-31 14:37:32 +00:00
$out/bin/kubectl completion zsh > $out/share/zsh/site-functions/_kubectl
2014-11-15 16:18:14 +00:00
'';
preFixup = ''
find $out/bin $pause/bin -type f -exec remove-references-to -t ${go_1_9} '{}' +
2014-11-15 16:18:14 +00:00
'';
2016-10-10 16:48:00 +00:00
meta = {
2016-06-06 10:58:51 +00:00
description = "Production-Grade Container Scheduling and Management";
2014-11-15 16:18:14 +00:00
license = licenses.asl20;
2018-05-01 03:03:23 +00:00
homepage = https://kubernetes.io;
maintainers = with maintainers; [johanot offline];
platforms = platforms.unix;
2014-11-15 16:18:14 +00:00
};
}