substitute: Add zstd support.
* guix/scripts/substitute.scm (%compression-methods): Add zstd. (compresses-better?): "lzip" always wins.
This commit is contained in:
parent
d288a4de7d
commit
016299d859
1 changed files with 3 additions and 0 deletions
|
@ -944,6 +944,8 @@ authorized substitutes."
|
||||||
;; supported. See 'decompressed-port' in (guix utils).
|
;; supported. See 'decompressed-port' in (guix utils).
|
||||||
`(("gzip" . ,(const #t))
|
`(("gzip" . ,(const #t))
|
||||||
("lzip" . ,(const #t))
|
("lzip" . ,(const #t))
|
||||||
|
("zstd" . ,(lambda ()
|
||||||
|
(resolve-module '(zstd) #t #f #:ensure #f)))
|
||||||
("xz" . ,(const #t))
|
("xz" . ,(const #t))
|
||||||
("bzip2" . ,(const #t))
|
("bzip2" . ,(const #t))
|
||||||
("none" . ,(const #t))))
|
("none" . ,(const #t))))
|
||||||
|
@ -961,6 +963,7 @@ this is a rough approximation."
|
||||||
(match compression1
|
(match compression1
|
||||||
("none" #f)
|
("none" #f)
|
||||||
("gzip" (string=? compression2 "none"))
|
("gzip" (string=? compression2 "none"))
|
||||||
|
("lzip" #t)
|
||||||
(_ (or (string=? compression2 "none")
|
(_ (or (string=? compression2 "none")
|
||||||
(string=? compression2 "gzip")))))
|
(string=? compression2 "gzip")))))
|
||||||
|
|
||||||
|
|
Reference in a new issue