summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-12-27 12:34:27 +0100
committerLudovic Courtès <ludo@gnu.org>2021-01-13 22:24:19 +0100
commit016299d85935cb269ae74c206c245ce23796160e (patch)
tree87830c09a25129f48c55e3cba0640094eadb8104 /guix/scripts
parentd288a4de7df90bcd7288f779883279c1202fbe23 (diff)
substitute: Add zstd support.
* guix/scripts/substitute.scm (%compression-methods): Add zstd. (compresses-better?): "lzip" always wins.
Diffstat (limited to 'guix/scripts')
-rwxr-xr-xguix/scripts/substitute.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index d5dff69e44..dcedc609d2 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -944,6 +944,8 @@ authorized substitutes."
;; supported. See 'decompressed-port' in (guix utils).
`(("gzip" . ,(const #t))
("lzip" . ,(const #t))
+ ("zstd" . ,(lambda ()
+ (resolve-module '(zstd) #t #f #:ensure #f)))
("xz" . ,(const #t))
("bzip2" . ,(const #t))
("none" . ,(const #t))))
@@ -961,6 +963,7 @@ this is a rough approximation."
(match compression1
("none" #f)
("gzip" (string=? compression2 "none"))
+ ("lzip" #t)
(_ (or (string=? compression2 "none")
(string=? compression2 "gzip")))))