guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

11/28: image: Support extra-directives, add hurd-directives.


From: guix-commits
Subject: 11/28: image: Support extra-directives, add hurd-directives.
Date: Sat, 30 May 2020 11:20:14 -0400 (EDT)

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

commit ee8131993439fb56d8ffb02e47cbbe85134783e7
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed May 27 13:15:46 2020 +0200

    image: Support extra-directives, add hurd-directives.
    
    * gnu/build/image.scm (initialize-root-partition): Add
    parameter '#:extra-directives' for populate root.
    * gnu/system/image.scm (system-disk-image): Likewise.
    (system-image): Use it to pass hurd-directives to create /hurd symlink when
    bulding for the Hurd.
---
 gnu/build/image.scm  | 3 ++-
 gnu/system/image.scm | 9 ++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index fb85bd4..7355c54 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -163,6 +163,7 @@ deduplicates files common to CLOSURE and the rest of 
PREFIX."
                                     system-directory
                                     (make-device-nodes
                                      make-essential-device-nodes)
+                                    (extra-directives '())
                                     #:allow-other-keys)
   "Initialize the given ROOT directory. Use BOOTCFG and BOOTCFG-LOCATION to
 install the bootloader configuration.
@@ -171,7 +172,7 @@ If REGISTER-CLOSURES? is true, register REFERENCES-GRAPHS 
in the store.  If
 DEDUPLICATE? is true, then also deduplicate files common to CLOSURES and the
 rest of the store when registering the closures. SYSTEM-DIRECTORY is the name
 of the directory of the 'system' derivation."
-  (populate-root-file-system system-directory root)
+  (populate-root-file-system system-directory root #:extras extra-directives)
   (populate-store references-graphs root)
 
   ;; Populate /dev.
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 15dac8a..1a9b294 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -202,6 +202,7 @@
                             bootcfg
                             bootloader
                             register-closures?
+                            (extra-directives '())
                             (inputs '()))
   "Return as a file-like object, the disk-image described by IMAGE.  Said
 image can be copied on a USB stick as is.  BOOTLOADER is the bootloader that
@@ -267,6 +268,7 @@ used in the image."
                               #:deduplicate? #f
                               #:system-directory #$os
                               #:grub-efi #+grub-efi
+                              #:extra-directives '#$extra-directives
                               #:bootloader-package
                               #+(bootloader-package bootloader)
                               #:bootloader-installer
@@ -526,13 +528,18 @@ image, depending on IMAGE format."
          (register-closures? (has-guix-service-type? os))
          (bootcfg (operating-system-bootcfg os))
          (bootloader (bootloader-configuration-bootloader
-                      (operating-system-bootloader os))))
+                      (operating-system-bootloader os)))
+         (hurd (operating-system-hurd os))
+         (hurd-directives (if hurd
+                              `(("/hurd" -> ,(file-append hurd "/hurd")))
+                              '())))
     (case (image-format image)
       ((disk-image)
        (system-disk-image image*
                           #:bootcfg bootcfg
                           #:bootloader bootloader
                           #:register-closures? register-closures?
+                          #:extra-directives hurd-directives
                           #:inputs `(("system" ,os)
                                      ("bootcfg" ,bootcfg))))
       ((iso9660)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]