aboutsummaryrefslogtreecommitdiff
path: root/guix/build/download-nar.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2024-03-27 05:22:31 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2024-03-27 05:22:31 +0100
commit4c70f5242befb5786cb437559a4d8701e630bd29 (patch)
treedbbff437004184d50c9a53f6c4897a85361aceb1 /guix/build/download-nar.scm
parenta9e65e0341d5045e425e3cf8d741a3d13cfa35a1 (diff)
parent929ddec8f4a181be653152c7436581c2adc54eee (diff)
downloadguix-4c70f5242befb5786cb437559a4d8701e630bd29.tar
guix-4c70f5242befb5786cb437559a4d8701e630bd29.tar.gz
Merge branch 'master' into emacs-team
Diffstat (limited to 'guix/build/download-nar.scm')
-rw-r--r--guix/build/download-nar.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/guix/build/download-nar.scm b/guix/build/download-nar.scm
index 3ba121b7fb..f26ad28cd0 100644
--- a/guix/build/download-nar.scm
+++ b/guix/build/download-nar.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2019, 2020, 2024 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,9 +57,9 @@ ITEM."
(restore-file decompressed-port
item))))
-(define (download-nar item)
- "Download and extract the normalized archive for ITEM. Return #t on
-success, #f otherwise."
+(define* (download-nar item #:optional (output item))
+ "Download and extract to OUTPUT the normalized archive for ITEM, a store
+item. Return #t on success, #f otherwise."
;; Let progress reports go through.
(setvbuf (current-error-port) 'none)
(setvbuf (current-output-port) 'none)
@@ -96,10 +96,10 @@ success, #f otherwise."
#:download-size size)))
(if (string-contains url "/lzip")
(restore-lzipped-nar port-with-progress
- item
+ output
size)
(restore-file port-with-progress
- item)))
+ output)))
(newline)
#t))))
(()