summaryrefslogtreecommitdiff
path: root/guix/scripts/archive.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-01-09 23:06:54 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-11 10:13:32 +0100
commit0c8491cbbead8d04b84714ee4f970f1f1c7be352 (patch)
treeae0c3546dbf28c91d5989d43f73a5f29249524cb /guix/scripts/archive.scm
parentc490a0b03768231d15f6b9b9df70a92e8fa6a9cb (diff)
Callers of 'build-derivations' & co. now honor its result.
* guix/profiles.scm (link-to-empty-profile): Use the result of 'build-derivations' instead of calling 'derivation->output-path'. * guix/scripts.scm (build-package): Likewise, and use 'format' directly instead of 'show-derivation-outputs'. (build-package-source): Likewise. * guix/scripts/archive.scm (export-from-store): Use result of 'build-derivations'. * guix/scripts/build.scm (guix-build): Likewise. Use 'format' instead of 'show-derivation-outputs'. * guix/scripts/copy.scm (send-to-remote-host): Use result of 'build-derivations'. * guix/scripts/package.scm (build-and-use-profile): Likewise. * guix/upstream.scm (download-tarball): Likewise. * guix/scripts/system.scm (reinstall-grub): Likewise. (perform-action): Use result of 'maybe-build'.
Diffstat (limited to 'guix/scripts/archive.scm')
-rw-r--r--guix/scripts/archive.scm36
1 files changed, 18 insertions, 18 deletions
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm
index 9e49c53635..bd64d9ff13 100644
--- a/guix/scripts/archive.scm
+++ b/guix/scripts/archive.scm
@@ -256,24 +256,24 @@ resulting archive to the standard output port."
#:use-substitutes? (assoc-ref opts 'substitutes?)
#:dry-run? (assoc-ref opts 'dry-run?))
- (if (or (assoc-ref opts 'dry-run?)
- (build-derivations store drv))
- (match (assoc-ref opts 'format)
- ("nar"
- (export-paths store files (current-output-port)
- #:recursive? (assoc-ref opts 'export-recursive?)))
- ("docker"
- (match files
- ((file)
- (let ((system (assoc-ref opts 'system)))
- (format #t "~a\n"
- (build-docker-image file #:system system))))
- (_
- ;; TODO: Remove this restriction.
- (leave (_ "only a single item can be exported to Docker~%")))))
- (format
- (leave (_ "~a: unknown archive format~%") format)))
- (leave (_ "unable to export the given packages~%")))))
+ (let ((files (if (assoc-ref opts 'dry-run?)
+ files
+ (build-derivations store drv))))
+ (match (assoc-ref opts 'format)
+ ("nar"
+ (export-paths store files (current-output-port)
+ #:recursive? (assoc-ref opts 'export-recursive?)))
+ ("docker"
+ (match files
+ ((file)
+ (let ((system (assoc-ref opts 'system)))
+ (format #t "~a\n"
+ (build-docker-image file #:system system))))
+ (_
+ ;; TODO: Remove this restriction.
+ (leave (_ "only a single item can be exported to Docker~%")))))
+ (format
+ (leave (_ "~a: unknown archive format~%") format))))))
(define (generate-key-pair parameters)
"Generate a key pair with PARAMETERS, a canonical sexp, and store it in the