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.
This commit is contained in:
Efraim Flashner 2023-06-13 13:41:51 +03:00
parent f2be1ea06a
commit da81784d60
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -418,7 +418,14 @@ (define (partition-image partition)
(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)