From ca541f9ce692ef96f6d5638eb37f70714cedd933 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 20 Nov 2019 12:13:32 +0100 Subject: pack: Allow multiple '--manifest' options. * guix/scripts/pack.scm (guix-pack): Collect 'manifest' options, and concatenate the resulting manifests. * tests/guix-pack.sh: Test it. * doc/guix.texi (Invoking guix pack): Document it. --- guix/scripts/pack.scm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'guix/scripts/pack.scm') diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 89b3e389fc..c8a52374bd 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -965,7 +965,10 @@ Create a bundle of PACKAGE.\n")) (list (transform store package) "out"))) (reverse (filter-map maybe-package-argument opts)))) - (manifest-file (assoc-ref opts 'manifest))) + (manifests (filter-map (match-lambda + (('manifest . file) file) + (_ #f)) + opts))) (define properties (if (assoc-ref opts 'save-provenance?) (lambda (package) @@ -979,11 +982,15 @@ Create a bundle of PACKAGE.\n")) (const '()))) (cond - ((and manifest-file (not (null? packages))) + ((and (not (null? manifests)) (not (null? packages))) (leave (G_ "both a manifest and a package list were given~%"))) - (manifest-file - (let ((user-module (make-user-module '((guix profiles) (gnu))))) - (load* manifest-file user-module))) + ((not (null? manifests)) + (concatenate-manifests + (map (lambda (file) + (let ((user-module (make-user-module + '((guix profiles) (gnu))))) + (load* file user-module))) + manifests))) (else (manifest (map (match-lambda -- cgit v1.2.3