From 56607088952d30b084cc858a031c68574aa07c84 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 17 Jan 2015 17:05:54 +0100 Subject: 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. --- guix/scripts/archive.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'guix/scripts') 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 @@ -56,6 +56,8 @@ (define (show-help) 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 (_ " @@ -107,6 +109,9 @@ (define %options (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 @@ (define (export-from-store store opts) (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) -- cgit v1.2.3