From 93f601d97ca2d9b82c41afeb86879ee37eae39e6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 23 May 2022 22:06:12 +0200 Subject: profiles: 'manifest->gexp' emits 'properties' field only when needed. Partly fixes . Reported by Ricardo Wurmus . 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(-) (limited to 'guix') 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))))) (($ 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 (($ (entries ...)) -- cgit v1.2.3