guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#45460] [PATCH 4/5] substitute: Add zstd support.


From: Ludovic Courtès
Subject: [bug#45460] [PATCH 4/5] substitute: Add zstd support.
Date: Sun, 27 Dec 2020 15:38:08 +0100

* guix/scripts/substitute.scm (%compression-methods): Add zstd.
(compresses-better?): "lzip" always wins.
---
 guix/scripts/substitute.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 8084c89ae5..32ebcf1bb9 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")))))
 
-- 
2.29.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]