summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-01-17 17:05:54 +0100
committerLudovic Courtès <ludo@gnu.org>2015-01-17 17:05:54 +0100
commit56607088952d30b084cc858a031c68574aa07c84 (patch)
tree689c6436d29a0f71622e8f9287df4ba7dd872b0d /guix
parent9decb18c0b206100d36fac708819a718369cf369 (diff)
guix archive: Add -r/--recursive.
* guix/scripts/archive.scm (show-help, %options): Add -r/--recursive. (export-from-store): Pass #:recursive? to 'export-paths'. * doc/guix.texi (Invoking guix archive): Add -r in Emacs example. Add example with ~/.guix-profile. Document -r/--recursive.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/archive.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm
index 65bf5423dc..b85119a0ff 100644
--- a/guix/scripts/archive.scm
+++ b/guix/scripts/archive.scm
@@ -57,6 +57,8 @@ Export/import one or more packages from/to the store.\n"))
(display (_ "
--export export the specified files/packages to stdout"))
(display (_ "
+ -r, --recursive combined with '--export', include dependencies"))
+ (display (_ "
--import import from the archive passed on stdin"))
(display (_ "
--missing print the files from stdin that are missing"))
@@ -107,6 +109,9 @@ Export/import one or more packages from/to the store.\n"))
(option '("export") #f #f
(lambda (opt name arg result)
(alist-cons 'export #t result)))
+ (option '(#\r "recursive") #f #f
+ (lambda (opt name arg result)
+ (alist-cons 'export-recursive? #t result)))
(option '("import") #f #f
(lambda (opt name arg result)
(alist-cons 'import #t result)))
@@ -230,7 +235,8 @@ resulting archive to the standard output port."
(if (or (assoc-ref opts 'dry-run?)
(build-derivations store drv))
- (export-paths store files (current-output-port))
+ (export-paths store files (current-output-port)
+ #:recursive? (assoc-ref opts 'export-recursive?))
(leave (_ "unable to export the given packages~%")))))
(define (generate-key-pair parameters)