diff --git a/pkgs/applications/networking/cluster/docker-machine/kvm2.nix b/pkgs/applications/networking/cluster/docker-machine/kvm2.nix index d8fa1a04507a..b8b9fa035d18 100644 --- a/pkgs/applications/networking/cluster/docker-machine/kvm2.nix +++ b/pkgs/applications/networking/cluster/docker-machine/kvm2.nix @@ -1,6 +1,6 @@ -{ stdenv, buildGoPackage, libvirt, pkgconfig, minikube }: +{ stdenv, buildGoModule, libvirt, pkgconfig, minikube }: -buildGoPackage rec { +buildGoModule rec { pname = "docker-machine-kvm2"; name = "${pname}-${version}"; version = minikube.version; @@ -10,6 +10,8 @@ buildGoPackage rec { src = minikube.src; + modSha256 = minikube.go-modules.outputHash; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libvirt ]; @@ -18,7 +20,7 @@ buildGoPackage rec { ''; postInstall = '' - mv $bin/bin/kvm $bin/bin/docker-machine-driver-kvm2 + mv $out/bin/kvm $out/bin/docker-machine-driver-kvm2 ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/networking/cluster/minikube/default.nix b/pkgs/applications/networking/cluster/minikube/default.nix index 8c85370728f5..5637e486ef11 100644 --- a/pkgs/applications/networking/cluster/minikube/default.nix +++ b/pkgs/applications/networking/cluster/minikube/default.nix @@ -49,6 +49,7 @@ in buildGoModule rec { ''; 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/