mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 19:23:50 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{ lib, stdenv
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, go-bindata
|
|
, installShellFiles
|
|
, pkg-config
|
|
, which
|
|
, libvirt
|
|
, vmnet
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "minikube";
|
|
version = "1.16.0";
|
|
|
|
vendorSha256 = "0nc2f9h77h24f0nvai5wvgmf1gh09dqfwrb6d5qghmq03a459san";
|
|
|
|
doCheck = false;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kubernetes";
|
|
repo = "minikube";
|
|
rev = "v${version}";
|
|
sha256 = "00dn8yy7mna0j8rdcnxbgnd5vkjdkqij8akgqhvbd32kxpqss890";
|
|
};
|
|
|
|
nativeBuildInputs = [ go-bindata installShellFiles pkg-config which ];
|
|
|
|
buildInputs = if stdenv.isDarwin then [ vmnet ] else if stdenv.isLinux then [ libvirt ] else null;
|
|
|
|
buildPhase = ''
|
|
make COMMIT=${src.rev}
|
|
'';
|
|
|
|
installPhase = ''
|
|
install out/minikube -Dt $out/bin
|
|
|
|
export HOME=$PWD
|
|
export MINIKUBE_WANTUPDATENOTIFICATION=false
|
|
export MINIKUBE_WANTKUBECTLDOWNLOADMSG=false
|
|
|
|
for shell in bash zsh fish; do
|
|
$out/bin/minikube completion $shell > minikube.$shell
|
|
installShellCompletion minikube.$shell
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://minikube.sigs.k8s.io";
|
|
description = "A tool that makes it easy to run Kubernetes locally";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ebzzry copumpkin vdemeester atkinschang Chili-Man ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|