[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/08: profiles: Add 'concatenate-manifests'.
From: |
guix-commits |
Subject: |
05/08: profiles: Add 'concatenate-manifests'. |
Date: |
Fri, 22 Nov 2019 09:13:56 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit ce30a0eb7e21481815df379b4621aa48a13200bb
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 20 12:07:02 2019 +0100
profiles: Add 'concatenate-manifests'.
* guix/profiles.scm (concatenate-manifests): New procedure.
* tests/profiles.scm ("concatenate-manifests"): New test.
---
guix/profiles.scm | 5 +++++
tests/profiles.scm | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index cd3b21e..f5e5cc3 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
diff --git a/tests/profiles.scm b/tests/profiles.scm
index a4e2867..21c912a 100644
--- a/tests/profiles.scm
+++ b/tests/profiles.scm
@@ -113,6 +113,11 @@
(manifest-matching-entries m (list p))
#f)))
+(test-equal "concatenate-manifests"
+ (manifest (list guile-2.0.9 glibc))
+ (concatenate-manifests (list (manifest (list guile-2.0.9))
+ (manifest (list glibc)))))
+
(test-assert "manifest-remove"
(let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug)))
(m1 (manifest-remove m0
- branch master updated (4e2e84d -> cf87919), guix-commits, 2019/11/22
- 03/08: import: texlive: Handle multi-license packages., guix-commits, 2019/11/22
- 01/08: substitute: Don't fetch /nix-cache-info., guix-commits, 2019/11/22
- 02/08: daemon: GC displays how much it has collected., guix-commits, 2019/11/22
- 07/08: pack: Allow multiple '--manifest' options., guix-commits, 2019/11/22
- 05/08: profiles: Add 'concatenate-manifests'.,
guix-commits <=
- 08/08: gnu: libseccomp: Fix build on AArch64., guix-commits, 2019/11/22
- 04/08: environment: Document that '--manifest' can be repeated., guix-commits, 2019/11/22
- 06/08: package: Allow multiple '--manifest' options., guix-commits, 2019/11/22