Subject: [bug#37466] [WIP v5 5/8] gnu: Add heads-coreboot.

From: Danny Milosavljevic <[email-masked]>
Date: Sat, 2 May 2020 19:11:15 +0200

* gnu/packages/heads.scm (heads-coreboot): New variable.
---
 gnu/packages/heads.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 78c5aa23f9..f6482d5f5a 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -620,3 +620,19 @@ servers.")
      `(#:make-flags
        '("BOARD=qemu-linuxboot")
        ,@(package-arguments heads-linuxboot)))))
+
+(define heads-coreboot
+  (package
+    (inherit heads)
+    (name "heads-coreboot")
+    (arguments
+     (substitute-keyword-arguments (package-arguments heads)
+      ((#:phases phases)
+       `(modify-phases ,phases
+          (add-before 'unpack-heads-packages 'unpack-coreboot
+            (lambda* (#:key inputs #:allow-other-keys)
+               (mkdir-p "build")
+               #t))))))
+    (native-inputs
+     `(("file" ,file)
+       ,@(package-native-inputs heads)))))