summaryrefslogtreecommitdiff
path: root/guix/profiles.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-11-20 12:07:02 +0100
committerLudovic Courtès <ludo@gnu.org>2019-11-22 15:07:58 +0100
commitce30a0eb7e21481815df379b4621aa48a13200bb (patch)
treeba23b2ac3bf64cdac1beb292bd0e35d9d9f919aa /guix/profiles.scm
parentd76df98fa59166c0c9f71ca41d664857d93e136d (diff)
downloadpatches-ce30a0eb7e21481815df379b4621aa48a13200bb.tar
patches-ce30a0eb7e21481815df379b4621aa48a13200bb.tar.gz
profiles: Add 'concatenate-manifests'.
* guix/profiles.scm (concatenate-manifests): New procedure. * tests/profiles.scm ("concatenate-manifests"): New test.
Diffstat (limited to 'guix/profiles.scm')
-rw-r--r--guix/profiles.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index cd3b21e390..f5e5cc33d6 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -92,6 +92,7 @@
manifest-pattern-version
manifest-pattern-output
+ concatenate-manifests
manifest-remove
manifest-add
manifest-lookup
@@ -515,6 +516,10 @@ procedure is here for backward-compatibility and will eventually vanish."
"Return the packages listed in MANIFEST."
(sexp->manifest (read port)))
+(define (concatenate-manifests lst)
+ "Concatenate the manifests listed in LST and return the resulting manifest."
+ (manifest (append-map manifest-entries lst)))
+
(define (entry-predicate pattern)
"Return a procedure that returns #t when passed a manifest entry that
matches NAME/OUTPUT/VERSION. OUTPUT and VERSION may be #f, in which case they