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

57 lines
1.3 KiB
Nix
Raw Normal View History

2019-08-13 11:02:34 -07:00
{ stdenv
, buildGoModule
, fetchFromGitHub
, go-bindata
2020-04-28 01:27:52 -07:00
, installShellFiles
, pkg-config
, which
2019-08-13 11:02:34 -07:00
, libvirt
, vmnet
2018-06-06 14:38:05 -07:00
}:
2019-08-13 11:02:34 -07:00
buildGoModule rec {
2020-04-28 01:27:52 -07:00
pname = "minikube";
2020-04-10 12:21:35 -07:00
version = "1.9.2";
2020-04-28 01:27:52 -07:00
2019-08-13 11:02:34 -07:00
# for -ldflags
2020-04-28 01:27:52 -07:00
commit = "1b78a7b8a99ad6a3c62b8d22f57120d614d17935";
2016-12-05 17:23:59 -08:00
2020-04-28 01:27:52 -07:00
modSha256 = "1pxs6myszgma3rzz0nhfjbnylv6m0xzlinvmlg0c4ijvkkzxg3v5";
src = fetchFromGitHub {
2020-04-28 01:27:52 -07:00
owner = "kubernetes";
repo = "minikube";
rev = "v${version}";
2020-04-10 12:21:35 -07:00
sha256 = "025v45427d885qkjjg7ig8fgrvjalnf1lajsj0cnbwbih2m69svg";
2016-12-05 17:23:59 -08:00
};
2020-04-28 01:27:52 -07:00
nativeBuildInputs = [ go-bindata installShellFiles pkg-config which ];
2017-03-04 19:23:44 -08:00
2020-04-28 01:27:52 -07:00
buildInputs = if stdenv.isDarwin then [ vmnet ] else if stdenv.isLinux then [ libvirt ] else null;
2020-04-28 01:27:52 -07:00
buildPhase = ''
make COMMIT=${commit}
'';
2020-04-28 01:27:52 -07:00
installPhase = ''
install out/minikube -Dt $out/bin
export HOME=$PWD
export MINIKUBE_WANTUPDATENOTIFICATION=false
export MINIKUBE_WANTKUBECTLDOWNLOADMSG=false
2019-08-13 11:02:34 -07:00
2020-04-28 01:27:52 -07:00
for shell in bash zsh; do
$out/bin/minikube completion $shell > minikube.$shell
installShellCompletion minikube.$shell
done
'';
2016-12-05 17:23:59 -08:00
meta = with stdenv.lib; {
2020-04-28 01:27:52 -07:00
homepage = "https://minikube.sigs.k8s.io";
2016-12-05 17:23:59 -08:00
description = "A tool that makes it easy to run Kubernetes locally";
2020-04-28 01:27:52 -07:00
license = licenses.asl20;
2019-08-13 11:02:34 -07:00
maintainers = with maintainers; [ ebzzry copumpkin vdemeester atkinschang ];
2020-04-28 01:27:52 -07:00
platforms = platforms.unix;
2016-12-05 17:23:59 -08:00
};
}