diff options
author | Pascal Bach <pascal.bach@nextrem.ch> | 2024-02-18 19:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 19:23:38 +0100 |
commit | a494dcfccfd911bc2a8b6feab9e35baeaac93bd1 (patch) | |
tree | a29c64e3eaead00ec8ed442deb0a57aa7cdbdfa9 /pkgs/applications/networking | |
parent | e2be2d143a1313d0fc0e1f733c9d9d4eddff489c (diff) | |
parent | 6018b404c8d7455cfa9b2d2a578d276008a62024 (diff) | |
download | nixlib-a494dcfccfd911bc2a8b6feab9e35baeaac93bd1.tar nixlib-a494dcfccfd911bc2a8b6feab9e35baeaac93bd1.tar.gz nixlib-a494dcfccfd911bc2a8b6feab9e35baeaac93bd1.tar.bz2 nixlib-a494dcfccfd911bc2a8b6feab9e35baeaac93bd1.tar.lz nixlib-a494dcfccfd911bc2a8b6feab9e35baeaac93bd1.tar.xz nixlib-a494dcfccfd911bc2a8b6feab9e35baeaac93bd1.tar.zst nixlib-a494dcfccfd911bc2a8b6feab9e35baeaac93bd1.zip |
Merge pull request #288565 from tanshihaj/minikube-with-qemu
minikube: use correct paths for firmware in case of qemu driver
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r-- | pkgs/applications/networking/cluster/minikube/default.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/minikube/default.nix b/pkgs/applications/networking/cluster/minikube/default.nix index dbd04f026dfa..bd9d0fece1b5 100644 --- a/pkgs/applications/networking/cluster/minikube/default.nix +++ b/pkgs/applications/networking/cluster/minikube/default.nix @@ -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 ]; |