guix-commits
[Top][All Lists]
Advanced

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

343/470: gnu: Add rust-jpeg-decoder-0.3.


From: guix-commits
Subject: 343/470: gnu: Add rust-jpeg-decoder-0.3.
Date: Thu, 16 Mar 2023 03:01:56 -0400 (EDT)

efraim pushed a commit to branch rust-team
in repository guix.

commit a60408f993dfb8384480a44dda8d23c0435abece
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Feb 23 16:01:05 2023 +0200

    gnu: Add rust-jpeg-decoder-0.3.
    
    * gnu/packages/crates-graphics.scm (rust-jpeg-decoder-0.3): New variable.
    (rust-jpeg-decoder-0.1): Inherit from rust-jpeg-decoder-0.3.
---
 gnu/packages/crates-graphics.scm | 39 +++++++++++++++++++++++++++++++++------
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index ba517cdaa8..18b852a8a8 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -1446,8 +1446,40 @@ filters and decoders for the most common image formats.")
 pixel buffers with width, height and stride.")
     (license license:cc0)))
 
+(define-public rust-jpeg-decoder-0.3
+  (package
+    (name "rust-jpeg-decoder")
+    (version "0.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "jpeg-decoder" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32 "0gkv0zx95i4fr40fj1a10d70lqi6lfyia8r5q8qjxj8j4pj0005w"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (substitute* "Cargo.toml"
+                    (("=0\\.2\\.83") "^0.2.83"))))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f                  ; Not all files included
+       #:cargo-inputs
+       (("rust-rayon" ,rust-rayon-1))
+       #:cargo-development-inputs
+       (("rust-criterion" ,rust-criterion-0.3)
+        ("rust-png" ,rust-png-0.16)
+        ("rust-walkdir" ,rust-walkdir-2)
+        ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
+        ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3))))
+    (home-page "https://github.com/image-rs/jpeg-decoder";)
+    (synopsis "JPEG decoder")
+    (description "JPEG decoder written in Rust.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-jpeg-decoder-0.1
   (package
+    (inherit rust-jpeg-decoder-0.3)
     (name "rust-jpeg-decoder")
     (version "0.1.22")
     (source
@@ -1458,7 +1490,6 @@ pixel buffers with width, height and stride.")
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "1wnh0bmmswpgwhgmlizz545x8334nlbmkq8imy9k224ri3am7792"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:tests? #f      ; Some test files missing.
        #:cargo-inputs
@@ -1467,11 +1498,7 @@ pixel buffers with width, height and stride.")
        #:cargo-development-inputs
        (("rust-criterion" ,rust-criterion-0.3)
         ("rust-png" ,rust-png-0.14)
-        ("rust-walkdir" ,rust-walkdir-2))))
-    (home-page "https://github.com/image-rs/jpeg-decoder";)
-    (synopsis "JPEG decoder")
-    (description "JPEG decoder written in Rust.")
-    (license (list license:expat license:asl2.0))))
+        ("rust-walkdir" ,rust-walkdir-2))))))
 
 (define-public rust-line-drawing-0.7
   (package



reply via email to

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