civodul pushed a commit to branch master
in repository guix.
commit 93f601d97ca2d9b82c41afeb86879ee37eae39e6
Author: Ludovic Courtès <[email protected]>
AuthorDate: Mon May 23 22:06:12 2022 +0200
profiles: 'manifest->gexp' emits 'properties' field only when needed.
Partly fixes <https://issues.guix.gnu.org/55499>.
Reported by Ricardo Wurmus <[email protected]>.
For a profile built with:
guix install r-seurat r-cistopic r-monocle3 r-cicero-monocle3
this reduces the size of the 'manifest' file from 6.4M to 5.6M (12%).
* guix/profiles.scm (manifest->gexp)[entry->gexp]: When PROPERTIES is
empty, do not emit a 'properties' field.
---
guix/profiles.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 3a547de492..bf50c00a1e 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -462,7 +462,9 @@ denoting a specific output of a package."
(propagated-inputs #$(map entry->gexp deps))
(search-paths #$(map search-path-specification->sexp
search-paths))
- (properties . #$properties)))
+ #$@(if (null? properties)
+ #~()
+ #~((properties . #$properties)))))
(($ <manifest-entry> name version output package
(deps ...) (search-paths ...) _ (properties ...))
#~(#$name #$version #$output
@@ -470,7 +472,9 @@ denoting a specific output of a package."
(propagated-inputs #$(map entry->gexp deps))
(search-paths #$(map search-path-specification->sexp
search-paths))
- (properties . #$properties)))))
+ #$@(if (null? properties)
+ #~()
+ #~((properties . #$properties)))))))
(match manifest
(($ <manifest> (entries ...))