treewide: clean up misc OVMF.fd references

We have passthru attributes, use them.
This commit is contained in:
K900 2024-02-26 11:32:32 +03:00
parent bf5c44d0d7
commit a15aa7a3f3
3 changed files with 5 additions and 6 deletions

View file

@ -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 [

View file

@ -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

View file

@ -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