minikube: set libvirt to PATH to avoid PROVIDER_KVM2_NOT_FOUND error

`minikube start --driver=kvm2` requires `virsh` command. Without it, the
following error is incurred:

  Exiting due to PROVIDER_KVM2_NOT_FOUND: The 'kvm2' provider was not
  found: exec: "virsh": executable file not found in $PATH

This commit adds libvirt to PATH to avoid this error.
This commit is contained in:
Ushitora Anqou
2026-07-16 23:39:21 +09:00
parent 20806e0226
commit c43f9cfcf9
+1
View File
@@ -72,6 +72,7 @@ buildGoModule (finalAttrs: {
installBin out/minikube
wrapProgram $out/bin/minikube --set MINIKUBE_WANTUPDATENOTIFICATION false \
--prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.hostPlatform.isLinux [ libvirt ])} \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath (lib.optionals stdenv.hostPlatform.isLinux [ libvirt ])
}