From a15aa7a3f35e95e788cdc1f8ac2df379ccc43577 Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 26 Feb 2024 11:32:32 +0300 Subject: [PATCH] treewide: clean up misc OVMF.fd references We have passthru attributes, use them. --- pkgs/applications/virtualization/xen/4.15.nix | 2 +- pkgs/development/quickemu/default.nix | 4 ++-- pkgs/tools/virtualization/multipass/default.nix | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/virtualization/xen/4.15.nix b/pkgs/applications/virtualization/xen/4.15.nix index 5cc81fc0ab85..d4905088ae1e 100644 --- a/pkgs/applications/virtualization/xen/4.15.nix +++ b/pkgs/applications/virtualization/xen/4.15.nix @@ -125,7 +125,7 @@ callPackage (import ./generic.nix (rec { ++ optional (withSeabios) "--with-system-seabios=${seabios}/share/seabios" ++ optional (!withInternalSeabios && !withSeabios) "--disable-seabios" - ++ optional (withOVMF) "--with-system-ovmf=${OVMF.fd}/FV/OVMF.fd" + ++ optional (withOVMF) "--with-system-ovmf=${OVMF.firmware}" ++ optional (withInternalOVMF) "--enable-ovmf"; NIX_CFLAGS_COMPILE = toString [ diff --git a/pkgs/development/quickemu/default.nix b/pkgs/development/quickemu/default.nix index 576c827e84b0..c8893a4e06b2 100644 --- a/pkgs/development/quickemu/default.nix +++ b/pkgs/development/quickemu/default.nix @@ -61,8 +61,8 @@ stdenv.mkDerivation rec { postPatch = '' sed -i \ - -e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.fd}/FV/OVMF_CODE.fd","${OVMFFull.fd}/FV/OVMF_VARS.fd" |' \ - -e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.fd}/FV/OVMF_CODE.fd","${OVMF.fd}/FV/OVMF_VARS.fd" |' \ + -e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.firmware}","${OVMFFull.variables}" |' \ + -e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \ -e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \ -e 's/Icon=.*qemu.svg/Icon=qemu/' \ quickemu diff --git a/pkgs/tools/virtualization/multipass/default.nix b/pkgs/tools/virtualization/multipass/default.nix index e7875f00bb6a..c746639e98ee 100644 --- a/pkgs/tools/virtualization/multipass/default.nix +++ b/pkgs/tools/virtualization/multipass/default.nix @@ -70,8 +70,8 @@ stdenv.mkDerivation # Patch the patch of the OVMF binaries to use paths from the nix store. substituteInPlace ./src/platform/backends/qemu/linux/qemu_platform_detail_linux.cpp \ - --replace "OVMF.fd" "${OVMF.fd}/FV/OVMF.fd" \ - --replace "QEMU_EFI.fd" "${OVMF.fd}/FV/QEMU_EFI.fd" + --replace "OVMF.fd" "${OVMF.firmware}" \ + --replace "QEMU_EFI.fd" "${OVMF.firmware}" # Copy the grpc submodule we fetched into the source code. cp -r --no-preserve=mode ${grpc_src} 3rd-party/grpc @@ -122,7 +122,6 @@ stdenv.mkDerivation dnsmasq iproute2 iptables - OVMF.fd qemu qemu-utils xterm