2021-05-11 07:44:38 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2019-08-13 19:02:34 +01:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, go-bindata
|
2020-04-28 09:27:52 +01:00
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, which
|
2019-08-13 19:02:34 +01:00
|
|
|
, libvirt
|
|
|
|
, vmnet
|
2018-06-06 22:38:05 +01:00
|
|
|
}:
|
2017-01-31 17:39:24 +00:00
|
|
|
|
2019-08-13 19:02:34 +01:00
|
|
|
buildGoModule rec {
|
2020-04-28 09:27:52 +01:00
|
|
|
pname = "minikube";
|
2021-05-11 07:44:38 +01:00
|
|
|
version = "1.20.0";
|
2020-04-28 09:27:52 +01:00
|
|
|
|
2021-05-11 07:44:38 +01:00
|
|
|
vendorSha256 = "sha256-ncgf2C4PZMoVMZIMDn9LwP2EDqg7T/WbUPRd/SqGGnU=";
|
2017-03-12 01:12:53 +00:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2017-03-12 01:12:53 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-04-28 09:27:52 +01:00
|
|
|
owner = "kubernetes";
|
|
|
|
repo = "minikube";
|
|
|
|
rev = "v${version}";
|
2021-05-11 07:44:38 +01:00
|
|
|
sha256 = "sha256-TnvbO8OLjnI5WGy3QR4OZbesOBat2VsL7ElCnj2Tkmk=";
|
2016-12-06 01:23:59 +00:00
|
|
|
};
|
|
|
|
|
2020-04-28 09:27:52 +01:00
|
|
|
nativeBuildInputs = [ go-bindata installShellFiles pkg-config which ];
|
2017-03-05 03:23:44 +00:00
|
|
|
|
2020-04-28 09:27:52 +01:00
|
|
|
buildInputs = if stdenv.isDarwin then [ vmnet ] else if stdenv.isLinux then [ libvirt ] else null;
|
2017-01-31 17:39:24 +00:00
|
|
|
|
2020-04-28 09:27:52 +01:00
|
|
|
buildPhase = ''
|
2020-07-12 10:20:00 +01:00
|
|
|
make COMMIT=${src.rev}
|
2017-03-12 01:12:53 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-28 09:27:52 +01:00
|
|
|
installPhase = ''
|
|
|
|
install out/minikube -Dt $out/bin
|
|
|
|
|
|
|
|
export HOME=$PWD
|
|
|
|
export MINIKUBE_WANTUPDATENOTIFICATION=false
|
|
|
|
export MINIKUBE_WANTKUBECTLDOWNLOADMSG=false
|
2019-08-13 19:02:34 +01:00
|
|
|
|
2020-07-12 10:20:00 +01:00
|
|
|
for shell in bash zsh fish; do
|
2020-04-28 09:27:52 +01:00
|
|
|
$out/bin/minikube completion $shell > minikube.$shell
|
|
|
|
installShellCompletion minikube.$shell
|
|
|
|
done
|
2018-05-08 03:38:29 +01:00
|
|
|
'';
|
2017-03-12 01:12:53 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-28 09:27:52 +01:00
|
|
|
homepage = "https://minikube.sigs.k8s.io";
|
2016-12-06 01:23:59 +00:00
|
|
|
description = "A tool that makes it easy to run Kubernetes locally";
|
2020-04-28 09:27:52 +01:00
|
|
|
license = licenses.asl20;
|
2020-10-10 01:34:52 +01:00
|
|
|
maintainers = with maintainers; [ ebzzry copumpkin vdemeester atkinschang Chili-Man ];
|
2020-04-28 09:27:52 +01:00
|
|
|
platforms = platforms.unix;
|
2016-12-06 01:23:59 +00:00
|
|
|
};
|
|
|
|
}
|