diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-11-20 12:13:32 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-11-22 15:07:59 +0100 |
commit | ca541f9ce692ef96f6d5638eb37f70714cedd933 (patch) | |
tree | 8a897ee6af065d81bc72a6238e3899b11c4f53ce /guix/scripts | |
parent | bf9206d8edb06cc4c62fe5559504cf1518c2de9e (diff) | |
download | gnu-guix-ca541f9ce692ef96f6d5638eb37f70714cedd933.tar gnu-guix-ca541f9ce692ef96f6d5638eb37f70714cedd933.tar.gz |
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.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/pack.scm | 17 |
1 files changed, 12 insertions, 5 deletions
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 |