minikube: use correct paths for firmware in case of qemu driver
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
, which
|
||||
, libvirt
|
||||
, vmnet
|
||||
, withQemu ? false
|
||||
, qemu
|
||||
, makeWrapper
|
||||
, OVMF
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@@ -24,6 +27,22 @@ buildGoModule rec {
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-2EWaMpcr4F1wRzIP1rPg1a/Sjd1x+oo2ee90k4Ie8cU=";
|
||||
};
|
||||
postPatch =
|
||||
(
|
||||
lib.optionalString (withQemu && stdenv.isDarwin) ''
|
||||
substituteInPlace \
|
||||
pkg/minikube/registry/drvs/qemu2/qemu2.go \
|
||||
--replace "/usr/local/opt/qemu/share/qemu" "${qemu}/share/qemu" \
|
||||
--replace "/opt/homebrew/opt/qemu/share/qemu" "${qemu}/share/qemu"
|
||||
''
|
||||
) + (
|
||||
lib.optionalString (withQemu && stdenv.isLinux) ''
|
||||
substituteInPlace \
|
||||
pkg/minikube/registry/drvs/qemu2/qemu2.go \
|
||||
--replace "/usr/share/OVMF/OVMF_CODE.fd" "${OVMF.firmware}" \
|
||||
--replace "/usr/share/AAVMF/AAVMF_CODE.fd" "${OVMF.firmware}"
|
||||
''
|
||||
);
|
||||
|
||||
nativeBuildInputs = [ installShellFiles pkg-config which makeWrapper ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user