Merge pull request #66578 from AtkinsChang/minikube

minikube: 1.2.0 -> 1.6.2
This commit is contained in:
Jörg Thalheim 2020-03-18 11:28:24 +00:00 committed by GitHub
commit 201ac90018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 46 deletions

View File

@ -711,6 +711,12 @@
githubId = 55833;
name = "Troels Henriksen";
};
atkinschang = {
email = "atkinschang+nixpkgs@gmail.com";
github = "AtkinsChang";
githubId = 5193600;
name = "Atkins Chang";
};
atnnn = {
email = "etienne@atnnn.com";
github = "atnnn";

View File

@ -0,0 +1,22 @@
{ lib, buildGoModule, minikube }:
buildGoModule rec {
inherit (minikube) version src nativeBuildInputs buildInputs goPackagePath preBuild;
pname = "docker-machine-hyperkit";
subPackages = [ "cmd/drivers/hyperkit" ];
modSha256 = minikube.go-modules.outputHash;
postInstall = ''
mv $out/bin/hyperkit $out/bin/docker-machine-driver-hyperkit
'';
meta = with lib; {
homepage = https://github.com/kubernetes/minikube/blob/master/docs/drivers.md;
description = "HyperKit driver for docker-machine.";
license = licenses.asl20;
maintainers = with maintainers; [ atkinschang ];
platforms = platforms.darwin;
};
}

View File

@ -1,32 +1,22 @@
{ stdenv, buildGoModule, libvirt, pkgconfig, minikube }:
{ lib, buildGoModule, minikube }:
buildGoModule rec {
pname = "docker-machine-kvm2";
version = minikube.version;
inherit (minikube) version src nativeBuildInputs buildInputs goPackagePath preBuild;
goPackagePath = "k8s.io/minikube";
pname = "docker-machine-kvm2";
subPackages = [ "cmd/drivers/kvm" ];
src = minikube.src;
modSha256 = minikube.go-modules.outputHash;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libvirt ];
preBuild = ''
export buildFlagsArray=(-ldflags="-X k8s.io/minikube/pkg/drivers/kvm/version.VERSION=v${version}")
'';
modSha256 = minikube.go-modules.outputHash;
postInstall = ''
mv $out/bin/kvm $out/bin/docker-machine-driver-kvm2
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = https://github.com/kubernetes/minikube/blob/master/docs/drivers.md;
description = "KVM2 driver for docker-machine.";
license = licenses.asl20;
maintainers = with maintainers; [ tadfisher ];
maintainers = with maintainers; [ tadfisher atkinschang ];
platforms = platforms.unix;
};
}

View File

@ -1,68 +1,67 @@
{ stdenv, buildGoModule, fetchFromGitHub, go-bindata, libvirt, qemu
, gpgme, makeWrapper, vmnet
, docker-machine-kvm, docker-machine-kvm2
, extraDrivers ? []
{ stdenv
, buildGoModule
, fetchFromGitHub
, pkgconfig
, makeWrapper
, go-bindata
, libvirt
, vmnet
}:
let
drivers = stdenv.lib.filter (d: d != null) (extraDrivers
++ stdenv.lib.optionals stdenv.isLinux [ docker-machine-kvm docker-machine-kvm2 ]);
binPath = drivers
++ stdenv.lib.optionals stdenv.isLinux ([ libvirt qemu ]);
in buildGoModule rec {
buildGoModule rec {
pname = "minikube";
version = "1.2.0";
kubernetesVersion = "1.15.0";
version = "1.8.1";
# for -ldflags
commit = "cbda04cf6bbe65e987ae52bb393c10099ab62014";
goPackagePath = "k8s.io/minikube";
subPackages = [ "cmd/minikube" ];
modSha256 = "1wyz8aq291lx614ilqrcgzdc8rjxbd6v3rv1fy6r2m6snyysycfn";
src = fetchFromGitHub {
owner = "kubernetes";
repo = "minikube";
rev = "v${version}";
sha256 = "0l9znrp49877cp1bkwx84c8lv282ga5a946rjbxi8gznkf3kwaw7";
sha256 = "1nf0n701rw3anp8j7k3f553ipqwpzzxci41zsi0il4l35dpln5g0";
};
modSha256 = "1cp63n0x2lgbqvvymx9byx48r42qw6w224x5x4iiarc2nryfdhn0";
buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin vmnet;
subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "cmd/drivers/hyperkit";
nativeBuildInputs = [ pkgconfig go-bindata makeWrapper ];
buildInputs = stdenv.lib.optionals stdenv.isLinux [ libvirt ]
++ stdenv.lib.optionals stdenv.isDarwin [ vmnet ];
preBuild = ''
go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
VERSION_MAJOR=$(grep "^VERSION_MAJOR" Makefile | sed "s/^.*\s//")
VERSION_MINOR=$(grep "^VERSION_MINOR" Makefile | sed "s/^.*\s//")
ISO_VERSION=v$VERSION_MAJOR.$VERSION_MINOR.0
ISO_BUCKET=$(grep "^ISO_BUCKET" Makefile | sed "s/^.*\s//")
KUBERNETES_VERSION=${kubernetesVersion}
export buildFlagsArray="-ldflags=\
-X k8s.io/minikube/pkg/version.version=v${version} \
-X k8s.io/minikube/pkg/version.isoVersion=$ISO_VERSION \
-X k8s.io/minikube/pkg/version.isoPath=$ISO_BUCKET \
-X k8s.io/minikube/vendor/k8s.io/client-go/pkg/version.gitVersion=$KUBERNETES_VERSION \
-X k8s.io/minikube/vendor/k8s.io/kubernetes/pkg/version.gitVersion=$KUBERNETES_VERSION"
-X ${goPackagePath}/pkg/version.version=v${version} \
-X ${goPackagePath}/pkg/version.isoVersion=$ISO_VERSION \
-X ${goPackagePath}/pkg/version.isoPath=$ISO_BUCKET \
-X ${goPackagePath}/pkg/version.gitCommitID=${commit} \
-X ${goPackagePath}/pkg/drivers/kvm.version=v${version} \
-X ${goPackagePath}/pkg/drivers/kvm.gitCommitID=${commit} \
-X ${goPackagePath}/pkg/drivers/hyperkit.version=v${version} \
-X ${goPackagePath}/pkg/drivers/hyperkit.gitCommitID=${commit}"
'';
postInstall = ''
wrapProgram $out/bin/${pname} --prefix PATH : $out/bin:${stdenv.lib.makeBinPath binPath}
mkdir -p $out/share/bash-completion/completions/
MINIKUBE_WANTUPDATENOTIFICATION=false MINIKUBE_WANTKUBECTLDOWNLOADMSG=false HOME=$PWD $out/bin/minikube completion bash > $out/share/bash-completion/completions/minikube
mkdir -p $out/share/zsh/site-functions/
MINIKUBE_WANTUPDATENOTIFICATION=false MINIKUBE_WANTKUBECTLDOWNLOADMSG=false HOME=$PWD $out/bin/minikube completion zsh > $out/share/zsh/site-functions/_minikube
''+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
mv $out/bin/hyperkit $out/bin/docker-machine-driver-hyperkit
'';
meta = with stdenv.lib; {
homepage = https://github.com/kubernetes/minikube;
description = "A tool that makes it easy to run Kubernetes locally";
license = licenses.asl20;
maintainers = with maintainers; [ ebzzry copumpkin vdemeester ];
maintainers = with maintainers; [ ebzzry copumpkin vdemeester atkinschang ];
platforms = with platforms; unix;
};
}

View File

@ -18845,6 +18845,7 @@ in
docker-gc = callPackage ../applications/virtualization/docker/gc.nix { };
docker-machine = callPackage ../applications/networking/cluster/docker-machine { };
docker-machine-hyperkit = callPackage ../applications/networking/cluster/docker-machine/hyperkit.nix { };
docker-machine-kvm = callPackage ../applications/networking/cluster/docker-machine/kvm.nix { };
docker-machine-kvm2 = callPackage ../applications/networking/cluster/docker-machine/kvm2.nix { };
docker-machine-xhyve = callPackage ../applications/networking/cluster/docker-machine/xhyve.nix {