aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-08-21 02:40:37 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-08-21 02:40:37 +0200
commit2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d (patch)
tree334bed3ef9be203d77065a75380696c2537ede92 /guix
parent9c4ce3afac2ad42c832dc7a9f0932744b5fd8892 (diff)
parente904de7ec1789e243e830b19187b5ef550b2eefa (diff)
downloadgnu-guix-2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d.tar
gnu-guix-2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/download.scm5
-rw-r--r--guix/scripts/pack.scm18
2 files changed, 14 insertions, 9 deletions
diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm
index bb3dc76741..f40213be33 100644
--- a/guix/scripts/download.scm
+++ b/guix/scripts/download.scm
@@ -143,12 +143,15 @@ Supported formats: 'nix-base32' (default), 'base32', and 'base16'
(arg (or (assq-ref opts 'argument)
(leave (G_ "no download URI was specified~%"))))
(uri (or (string->uri arg)
+ (false-if-exception
+ (string->uri
+ (string-append "file://" (canonicalize-path arg))))
(leave (G_ "~a: failed to parse URI~%")
arg)))
(fetch (assq-ref opts 'download-proc))
(path (parameterize ((current-terminal-columns
(terminal-columns)))
- (fetch arg
+ (fetch (uri->string uri)
#:verify-certificate?
(assq-ref opts 'verify-certificate?))))
(hash (call-with-input-file
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 1273c09f54..c269a1fefc 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -50,19 +51,20 @@
(compressor name extension command)
compressor?
(name compressor-name) ;string (e.g., "gzip")
- (extension compressor-extension) ;string (e.g., "lz")
+ (extension compressor-extension) ;string (e.g., ".lz")
(command compressor-command)) ;gexp (e.g., #~("/gnu/store/…/gzip" "-9n"))
(define %compressors
;; Available compression tools.
- (list (compressor "gzip" "gz"
+ (list (compressor "gzip" ".gz"
#~(#+(file-append gzip "/bin/gzip") "-9n"))
- (compressor "lzip" "lz"
+ (compressor "lzip" ".lz"
#~(#+(file-append lzip "/bin/lzip") "-9"))
- (compressor "xz" "xz"
+ (compressor "xz" ".xz"
#~(#+(file-append xz "/bin/xz") "-e -T0"))
- (compressor "bzip2" "bz2"
- #~(#+(file-append bzip2 "/bin/bzip2") "-9"))))
+ (compressor "bzip2" ".bz2"
+ #~(#+(file-append bzip2 "/bin/bzip2") "-9"))
+ (compressor "none" "" #f)))
(define (lookup-compressor name)
"Return the compressor object called NAME. Error out if it could not be
@@ -180,7 +182,7 @@ added to the pack."
(_ #f))
directives)))))))))
- (gexp->derivation (string-append name ".tar."
+ (gexp->derivation (string-append name ".tar"
(compressor-extension compressor))
build
#:references-graphs `(("profile" ,profile))))
@@ -245,7 +247,7 @@ the image."
#:compressor '#$(compressor-command compressor)
#:creation-time (make-time time-utc 0 1)))))
- (gexp->derivation (string-append name ".tar."
+ (gexp->derivation (string-append name ".tar"
(compressor-extension compressor))
build
#:references-graphs `(("profile" ,profile))))