gnu: Add python-pyshp.
[jackhill/guix/guix.git] / gnu / packages / crates-graphics.scm
index 71719fe..bc47bf1 100644 (file)
@@ -10,6 +10,7 @@
 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (gnu packages)
+  #:use-module (gnu packages assembly)
   #:use-module (gnu packages crates-io)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages llvm)
@@ -269,6 +271,38 @@ the term library to handle the ANSI nonsense and hence it works on Windows,
 Mac, and Unix.")
     (license (list license:asl2.0 license:expat))))
 
+(define-public rust-avif-parse-0.13
+  (package
+    (name "rust-avif-parse")
+    (version "0.13.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "avif-parse" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1vylrjq77mpl6flmd85j5f2qimh6vjn03syvq8agb62x56khm0xj"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-bitreader" ,rust-bitreader-0.3)
+        ("rust-byteorder" ,rust-byteorder-1)
+        ("rust-fallible-collections" ,rust-fallible-collections-0.4)
+        ("rust-log" ,rust-log-0.4)
+        ("rust-static-assertions" ,rust-static-assertions-1))
+       #:cargo-development-inputs
+       (("rust-env-logger" ,rust-env-logger-0.8)
+        ("rust-walkdir" ,rust-walkdir-2))))
+    (home-page "https://github.com/kornelski/avif-parse")
+    (synopsis "Parser for AVIF image files")
+    (description "This AVIF parser allows extracting the AV1 payload and alpha
+channel metadata out of AVIF image files.  The parser is a fork of Mozilla's
+MP4 parser used in Firefox, so it's designed to be robust and safely handle
+untrusted data.")
+    (license license:mpl2.0)))
+
 (define-public rust-avif-serialize-0.6
   (package
     (name "rust-avif-serialize")
@@ -907,8 +941,7 @@ EUI-64, also known as MAC-48 media access control addresses.")
         (base32 "18szbh4dixcr7pmymvbrpv21hv0wrpii5w03rv2534bb2ywwpq8s"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
+     `(#:cargo-inputs
        (("rust-android-glue" ,rust-android-glue-0.2)
         ("rust-cgl" ,rust-cgl-0.3)
         ("rust-cocoa" ,rust-cocoa-0.23)
@@ -924,10 +957,12 @@ EUI-64, also known as MAC-48 media access control addresses.")
         ("rust-objc" ,rust-objc-0.2)
         ("rust-osmesa-sys" ,rust-osmesa-sys-0.1)
         ("rust-parking-lot" ,rust-parking-lot-0.11)
-        ("rust-wayland-client" ,rust-wayland-client-0.28)
         ("rust-wayland-egl" ,rust-wayland-egl-0.28)
         ("rust-winapi" ,rust-winapi-0.3)
         ("rust-winit" ,rust-winit-0.24))))
+    (inputs
+     `(("rust-wayland-client" ,rust-wayland-client-0.28)
+       ("rust-wayland-egl" ,rust-wayland-egl-0.28)))
     (home-page "https://github.com/tomaka/glutin")
     (synopsis "Cross-platform OpenGL context provider")
     (description "This package provides an OpenGL context provider.")
@@ -1914,72 +1949,6 @@ interactive applications.")
         ("rust-glob" ,rust-glob-0.2)
         ("rust-term" ,rust-term-0.4))))))
 
-(define-public rust-rav1e-0.4
-  (package
-    (name "rust-rav1e")
-    (version "0.4.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (crate-uri "rav1e" version))
-       (file-name (string-append name "-" version ".tar.gz"))
-       (sha256
-        (base32 "02cpgzycfgnflnv8sck6ajasa7abfgdzn6b4jv01sf6r21yfipbq"))))
-    (build-system cargo-build-system)
-    (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
-       (("rust-aom-sys" ,rust-aom-sys-0.2)
-        ("rust-arbitrary" ,rust-arbitrary-0.4)
-        ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
-        ("rust-arrayvec" ,rust-arrayvec-0.5)
-        ("rust-av-metrics" ,rust-av-metrics-0.6)
-        ("rust-backtrace" ,rust-backtrace-0.3)
-        ("rust-bitstream-io" ,rust-bitstream-io-1)
-        ("rust-byteorder" ,rust-byteorder-1)
-        ("rust-cc" ,rust-cc-1)
-        ("rust-cfg-if" ,rust-cfg-if-1)
-        ("rust-clap" ,rust-clap-2)
-        ("rust-console" ,rust-console-0.14)
-        ("rust-crossbeam" ,rust-crossbeam-0.8)
-        ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
-        ("rust-fern" ,rust-fern-0.6)
-        ("rust-image" ,rust-image-0.23)
-        ("rust-interpolate-name" ,rust-interpolate-name-0.2)
-        ("rust-itertools" ,rust-itertools-0.10)
-        ("rust-ivf" ,rust-ivf-0.1)
-        ("rust-libc" ,rust-libc-0.2)
-        ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
-        ("rust-log" ,rust-log-0.4)
-        ("rust-nasm-rs" ,rust-nasm-rs-0.2)
-        ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
-        ("rust-num-derive" ,rust-num-derive-0.3)
-        ("rust-num-traits" ,rust-num-traits-0.2)
-        ("rust-paste" ,rust-paste-1)
-        ("rust-rand" ,rust-rand-0.8)
-        ("rust-rand-chacha" ,rust-rand-chacha-0.3)
-        ("rust-rayon" ,rust-rayon-1)
-        ("rust-regex" ,rust-regex-1)
-        ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
-        ("rust-rustc-version" ,rust-rustc-version-0.3)
-        ("rust-scan-fmt" ,rust-scan-fmt-0.2)
-        ("rust-serde" ,rust-serde-1)
-        ("rust-signal-hook" ,rust-signal-hook-0.3)
-        ("rust-simd-helpers" ,rust-simd-helpers-0.1)
-        ("rust-thiserror" ,rust-thiserror-1)
-        ("rust-toml" ,rust-toml-0.5)
-        ("rust-v-frame" ,rust-v-frame-0.2)
-        ("rust-vergen" ,rust-vergen-3)
-        ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
-        ("rust-y4m" ,rust-y4m-0.7))))
-    (home-page "https://github.com/xiph/rav1e")
-    (synopsis "Fast and safe AV1 encoder")
-    (description
-     "@code{rav1e} is an AV1 video encoder.  It is designed to eventually
-cover all use cases, though in its current form it is most suitable for cases
-where libaom (the reference encoder) is too slow.")
-    (license license:bsd-2)))
-
 (define-public rust-ravif-0.6
   (package
     (name "rust-ravif")
@@ -1993,20 +1962,22 @@ where libaom (the reference encoder) is too slow.")
         (base32 "1gyc7w1fz3qdk95cdpkj185dm6lskxfp329xm69waxc565fcz9rx"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
+     `(#:cargo-inputs
        (("rust-avif-serialize" ,rust-avif-serialize-0.6)
         ("rust-imgref" ,rust-imgref-1)
         ("rust-loop9" ,rust-loop9-0.1)
         ("rust-num-cpus" ,rust-num-cpus-1)
-        ("rust-rav1e" ,rust-rav1e-0.4)
+        ("rav1e" ,rav1e)
         ("rust-rayon" ,rust-rayon-1)
-        ("rust-rgb" ,rust-rgb-0.8))))
+        ("rust-rgb" ,rust-rgb-0.8))
+       #:cargo-development-inputs
+       (("rust-avif-parse" ,rust-avif-parse-0.13))))
+    (native-inputs
+     `(("nasm" ,nasm)))                 ;for building rav1e
     (home-page "https://lib.rs/ravif")
     (synopsis "Library for encoding images in AVIF format")
-    (description
-     "This package is a rav1e-based pure Rust library for encoding images in
-AVIF format.")
+    (description "This package is a rav1e-based pure Rust library for encoding
+images in AVIF format.")
     (license license:bsd-3)))
 
 (define-public rust-raw-window-handle-0.3
@@ -2528,7 +2499,7 @@ properly display animated cursors.")
     (synopsis "Bindings to libwayland-egl")
     (description
      "This crate provides bindings for OpenGL/Vulkan support for
-Wayland client apps.  It allows to create an EGLSurface from any
+Wayland client apps.  It creates an EGLSurface from any
 WlSurface, which can then play the role of the base surface for
 initializing an OpenGL or Vulkan context.")
     (license license:expat)))
@@ -2682,18 +2653,25 @@ wayland-client crate for usable bindings.")
         (base32 "09jfdjfqhjfcpiz4csgh60ymfkmz1cl3jmxyzq9hzcp0kyyxix93"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
+     `(#:cargo-inputs
        (("rust-bitflags" ,rust-bitflags-1)
         ("rust-downcast-rs" ,rust-downcast-rs-1)
         ("rust-lazy-static" ,rust-lazy-static-1)
         ("rust-libc" ,rust-libc-0.2)
         ("rust-nix" ,rust-nix-0.18)
         ("rust-parking-lot" ,rust-parking-lot-0.11)
-        ("rust-scoped-tls" ,rust-scoped-tls-1)
-        ("rust-wayland-commons" ,rust-wayland-commons-0.28)
-        ("rust-wayland-scanner" ,rust-wayland-scanner-0.28)
-        ("rust-wayland-sys" ,rust-wayland-sys-0.28))))
+        ("rust-scoped-tls" ,rust-scoped-tls-1))))
+    (inputs
+     `(("rust-bitflags" ,rust-bitflags-1)
+       ("rust-downcast-rs" ,rust-downcast-rs-1)
+       ("rust-lazy-static" ,rust-lazy-static-1)
+       ("rust-libc" ,rust-libc-0.2)
+       ("rust-nix" ,rust-nix-0.18)
+       ("rust-parking-lot" ,rust-parking-lot-0.11)
+       ("rust-scoped-tls" ,rust-scoped-tls-1)
+       ("rust-wayland-commons" ,rust-wayland-commons-0.28)
+       ("rust-wayland-scanner" ,rust-wayland-scanner-0.28)
+       ("rust-wayland-sys" ,rust-wayland-sys-0.28)))
     (home-page "https://github.com/smithay/wayland-rs")
     (synopsis
      "Bindings to the standard C implementation of the wayland protocol")
@@ -2717,7 +2695,8 @@ the wayland protocol, server side.")
         (base32
          "1ccsalq6gnf07klnbjx2dxcbibhw03rqsgi578p913s3zsjlcg8a"))))
     (arguments
-     `(#:cargo-inputs
+     `(#:skip-build? #t
+       #:cargo-inputs
        (("rust-bitflags" ,rust-bitflags-1)
         ("rust-calloop" ,rust-calloop-0.4)
         ("rust-downcast-rs" ,rust-downcast-rs-1)
@@ -2726,7 +2705,8 @@ the wayland protocol, server side.")
         ("rust-nix" ,rust-nix-0.14)
         ("rust-wayland-commons" ,rust-wayland-commons-0.23)
         ("rust-wayland-sys" ,rust-wayland-sys-0.23)
-        ("rust-wayland-scanner" ,rust-wayland-scanner-0.23))))))
+        ("rust-wayland-scanner" ,rust-wayland-scanner-0.23))))
+    (inputs `())))
 
 (define-public rust-wayland-server-0.21
   (package
@@ -2873,10 +2853,11 @@ crate @code{rust-wayland-client} for usable bindings.")
         ("rust-smithay-client-toolkit" ,rust-smithay-client-toolkit-0.12)
         ("rust-stdweb" ,rust-stdweb-0.4)
         ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
-        ("rust-wayland-client" ,rust-wayland-client-0.28)
         ("rust-web-sys" ,rust-web-sys-0.3)
         ("rust-winapi" ,rust-winapi-0.3)
         ("rust-x11-dl" ,rust-x11-dl-2))))
+    (inputs
+     `(("rust-wayland-client" ,rust-wayland-client-0.28)))
     (home-page "https://github.com/rust-windowing/winit")
     (synopsis "Window creation library")
     (description