Subject: [bug#69257] [PATCH 070/228] gnu: Add rust-libflate-2.

From: Herman Rimm <[email-masked]>
Date: Sun, 18 Feb 2024 22:03:08 +0100

* gnu/packages/crates-web.scm (rust-libflate-2): Add variable.
(rust-libflate-1): Inherit rust-libflate-2.

Change-Id: I929d97b3f4a0ac9b015c39e92993190c062a5192
---
 gnu/packages/crates-io.scm | 34 +++++++++++++++++++++++++++-------
 1 file changed, 27 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index f0cc910da1..b004ccb08a 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -33820,8 +33820,34 @@ (define-public rust-libdeflater-0.11
        (("rust-criterion" ,rust-criterion-0.3)
         ("rust-flate2" ,rust-flate2-1))))))
 
+(define-public rust-libflate-2
+  (package
+    (name "rust-libflate")
+    (version "2.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "libflate" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1gxjqgbzzn6sdalrd2cfn7zb14c75if3dx3nzz3sz58pmra5czcz"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-adler32" ,rust-adler32-1)
+                       ("rust-core2" ,rust-core2-0.4)
+                       ("rust-crc32fast" ,rust-crc32fast-1)
+                       ("rust-dary-heap" ,rust-dary-heap-0.3)
+                       ("rust-libflate-lz77" ,rust-libflate-lz77-2))
+       #:cargo-development-inputs (("rust-clap" ,rust-clap-2))))
+    (home-page "https://github.com/sile/libflate")
+    (synopsis "DEFLATE algorithm and related formats (ZLIB, GZIP)")
+    (description "This package provides a Rust implementation of DEFLATE
+algorithm and related formats (ZLIB, GZIP).")
+    (license license:expat)))
+
 (define-public rust-libflate-1
   (package
+    (inherit rust-libflate-2)
     (name "rust-libflate")
     (version "1.1.1")
     (source
@@ -33831,19 +33857,13 @@ (define-public rust-libflate-1
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "07hlzg1zly4dw9s39fv2ik6nfcjpjgx82b5kkf3bafdvdvvlldhn"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
        (("rust-adler32" ,rust-adler32-1)
         ("rust-crc32fast" ,rust-crc32fast-1)
         ("rust-libflate-lz77" ,rust-libflate-lz77-1))
        #:cargo-development-inputs
-       (("rust-clap" ,rust-clap-2))))
-    (home-page "https://github.com/sile/libflate")
-    (synopsis "DEFLATE algorithm and related formats (ZLIB, GZIP)")
-    (description "This package provides a Rust implementation of DEFLATE
-algorithm and related formats (ZLIB, GZIP).")
-    (license license:expat)))
+       (("rust-clap" ,rust-clap-2))))))
 
 (define-public rust-libflate-0.1
   (package
-- 
2.41.0