guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: image: Build partitions with only necessary inputs.


From: guix-commits
Subject: 01/02: gnu: image: Build partitions with only necessary inputs.
Date: Mon, 19 Jun 2023 09:33:18 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit da81784d60d495fc70fe4b113e525b7a4006789a
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Jun 13 13:41:51 2023 +0300

    gnu: image: Build partitions with only necessary inputs.
    
    * gnu/system/image.scm (system-disk-image)[partition-image]: Adjust the
    inputs used by the image-builder to only use the packages necessary to
    build that partition.
---
 gnu/system/image.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 958ba5cbb2..81346495c2 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -418,7 +418,14 @@ used in the image."
               (with-imported-modules*
                (let ((initializer (or #$(partition-initializer partition)
                                       initialize-root-partition))
-                     (inputs '#+(list e2fsprogs fakeroot dosfstools mtools))
+                     (inputs '#+(cond
+                                  ((string-prefix? "ext" type)
+                                   (list e2fsprogs fakeroot))
+                                  ((or (string=? type "vfat")
+                                       (string-prefix? "fat" type))
+                                   (list dosfstools fakeroot mtools))
+                                  (else
+                                    '())))
                      (image-root "tmp-root"))
                  (sql-schema #$schema)
 



reply via email to

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