From 209aed9511f41b2bfabe32d2e280192e64e3d54b Mon Sep 17 00:00:00 2001
From: Marius Bakke <marius@gnu.org>
Date: Thu, 22 Dec 2022 13:50:30 +0100
Subject: gnu: Install QEMU firmare files to 'share/qemu'.

This paves the way for using a native search path in the future.

* gnu/packages/bootloaders.scm (ipxe-qemu)[arguments]: Install firmware files
to 'share/qemu' instead of 'share/firmware'.
* gnu/packages/firmware.scm (seabios-qemu)[arguments]: Likewise.
* gnu/packages/virtualization.scm (qemu)[arguments]: Adjust accordingly.
---
 gnu/packages/bootloaders.scm    | 2 +-
 gnu/packages/firmware.scm       | 2 +-
 gnu/packages/virtualization.scm | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

(limited to 'gnu')

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 04d7eefae2..7c4c92ad9d 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1577,7 +1577,7 @@ the features of iPXE without the hassle of reflashing.")
           #~(modify-phases #$phases
               (replace 'install
                 (lambda _
-                  (let ((firmware (string-append #$output "/share/firmware")))
+                  (let ((firmware (string-append #$output "/share/qemu")))
                     (mkdir-p firmware)
                     (for-each
                      (match-lambda
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 03c84fbe88..eac3176d72 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -560,7 +560,7 @@ coreboot.")
                                 vgabiosen))))))
             (replace 'install
               (lambda _
-                (let ((firmware (string-append #$output "/share/firmware")))
+                (let ((firmware (string-append #$output "/share/qemu")))
                   (for-each (lambda (bios)
                               (install-file bios firmware))
                             (find-files "out" "\\.bin$"))
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 5c832beb9f..9f1db849a3 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -198,9 +198,9 @@
       #~(let ((gcc (search-input-file %build-inputs "/bin/gcc"))
               (meson (search-input-file %build-inputs "bin/meson"))
               (seabios (search-input-file %build-inputs
-                                          "share/firmware/bios.bin"))
+                                          "share/qemu/bios.bin"))
               (ipxe (search-input-file %build-inputs
-                                       "share/firmware/pxe-virtio.rom"))
+                                       "share/qemu/pxe-virtio.rom"))
               (out #$output))
           (list (string-append "--cc=" gcc)
                 ;; Some architectures insist on using HOST_CC.
@@ -231,10 +231,10 @@
           (add-after 'unpack 'replace-firmwares
             (lambda* (#:key inputs #:allow-other-keys)
               (let* ((seabios (dirname (search-input-file
-                                        inputs "share/firmware/bios.bin")))
+                                        inputs "share/qemu/bios.bin")))
                      (seabios-firmwares (find-files seabios "\\.bin$"))
                      (ipxe (dirname (search-input-file
-                                     inputs "share/firmware/pxe-virtio.rom")))
+                                     inputs "share/qemu/pxe-virtio.rom")))
                      (ipxe-firmwares (find-files ipxe "\\.rom$"))
                      (allowed-differences
                       ;; Ignore minor differences (addresses etc) in the firmware
-- 
cgit 1.4.1