Subject: [PATCH 4/9] gnu: Add ovmf-x86-64-microvm.

From: Efraim Flashner <[email-masked]>
Date: Fri, 21 Mar 2025 10:53:05 +0200

* gnu/packages/firmware.scm (ovmf-x86-64-microvm): New variable.

Change-Id: I1c8d7b037a84d7855d53def4c639a037c429aedb
---
 gnu/packages/firmware.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 35bfa6425ac..e7d2e390acc 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1138,6 +1138,24 @@ (define-public ovmf-x86-64
                            "OVMF_CODE"
                            "OVMF_VARS"))))))))))))
 
+(define-public ovmf-x86-64-microvm
+  (let ((base (make-ovmf-firmware "x86_64")))
+    (package
+      (inherit base)
+      (name "ovmf-x86-64-microvm")
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (replace 'build
+                (lambda _
+                  (invoke "build" "-a" "X64" "-t" "GCC" "-p"
+                          "OvmfPkg/Microvm/MicrovmX64.dsc")))
+              (replace 'install
+                (lambda _
+                  (install-file "Build/MicrovmX64/RELEASE_GCC/FV/MICROVM.fd"
+                                (string-append #$output "/share/firmware")))))))))))
+
 (define-public ovmf-i686
   (let ((base (make-ovmf-firmware "i686")))
     (package
-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted