summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-01-07 17:21:48 +0200
committerEfraim Flashner <efraim@flashner.co.il>2024-02-20 13:57:34 +0200
commitb755405103fa27f5c71ecad693053369d3edfc18 (patch)
treec6cb40578008c7466e8288f530515d4492cc2afd /gnu/packages
parenta440b5eb2f1afcaccebd0f702b738c34a4bbc109 (diff)
gnu: Add rust-libdav1d-sys-0.6.
* gnu/packages/crates-graphics.scm (rust-libdav1d-sys-0.6): New variable. Change-Id: I51934b63c2533c810606e0645e6d39555da10018
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/crates-graphics.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index dbe930092c..5e1321da7e 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -33,6 +33,7 @@
(define-module (gnu packages crates-graphics)
#:use-module (guix build-system cargo)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
@@ -2243,6 +2244,37 @@ pixel buffers with width, height and stride.")
("rust-png" ,rust-png-0.14)
("rust-walkdir" ,rust-walkdir-2))))))
+(define-public rust-libdav1d-sys-0.6
+ (package
+ (name "rust-libdav1d-sys")
+ (version "0.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "libdav1d-sys" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0wh5jgdm33ld6djxsc7cmwd1ifqys145zlbsf8516n625lscrj8j"))
+ (snippet
+ #~(begin (use-modules (guix build utils))
+ (delete-file-recursively "vendor")
+ ;; Force linking to our packaged dav1d.
+ (delete-file "build.rs")
+ (with-output-to-file "build.rs"
+ (lambda _
+ (format #t "fn main() {~@
+ println!(\"cargo:rustc-link-lib=dav1d\");~@
+ }~%")))))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-libc" ,rust-libc-0.2))))
+ (inputs (list dav1d))
+ (home-page "https://github.com/njaard/libavif-rs")
+ (synopsis "Link to dav1d AV1 decoder")
+ (description
+ "This package builds and links to the dav1d AV1 decoder.")
+ (license license:bsd-2)))
+
(define-public rust-libwebp-sys-0.4
(package
(name "rust-libwebp-sys")