Subject: [PATCHv2 rust-team 21/27] gnu: Add rust-graphene-sys-0.19.

From: Giacomo Leidi <[email-masked]>
Date: Wed, 6 Nov 2024 21:41:25 +0100

* gnu/packages/crates-gtk.scm (rust-graphene-sys-0.19): New variable;
(rust-graphene-sys-0.18): inherit from rust-graphene-sys-0.19.

Change-Id: I873e8f73c25d19626a3086bf3e7a2dce1e47c152
---
 gnu/packages/crates-gtk.scm | 34 ++++++++++++++++++++++++++++++----
 1 file changed, 30 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index 99068e8c02..3be021a9ae 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -2591,20 +2591,26 @@ (define-public rust-graphene-rs-0.18
     (description "Rust bindings for the Graphene library.")
     (license license:expat)))
 
-(define-public rust-graphene-sys-0.18
+(define-public rust-graphene-sys-0.19
   (package
     (name "rust-graphene-sys")
-    (version "0.18.1")
+    (version "0.19.8")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "graphene-sys" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "0n8zlg7z26lwpnvlqp1hjlgrs671skqwagdpm7r8i1zwx3748hfc"))))
+        (base32 "01dg4wgqxaqkdv0vl7hr14b6kbbm96gwdsb5a2ss9jxw8h4hwlrg"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (substitute* "Cargo.toml"
+             ;; Patch rust-pkg-config version.
+             (("version = \"0.3.29\"") "version = \">= 0.3.27\""))))))
     (build-system cargo-build-system)
     (arguments
-     `(#:cargo-inputs (("rust-glib-sys" ,rust-glib-sys-0.18)
+     `(#:cargo-inputs (("rust-glib-sys" ,rust-glib-sys-0.19)
                        ("rust-libc" ,rust-libc-0.2)
                        ("rust-pkg-config" ,rust-pkg-config-0.3)
                        ("rust-system-deps" ,rust-system-deps-6))
@@ -2617,6 +2623,26 @@ (define-public rust-graphene-sys-0.18
     (description "FFI bindings to libgraphene-1.0.")
     (license license:expat)))
 
+(define-public rust-graphene-sys-0.18
+  (package
+    (inherit rust-graphene-sys-0.19)
+    (name "rust-graphene-sys")
+    (version "0.18.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "graphene-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0n8zlg7z26lwpnvlqp1hjlgrs671skqwagdpm7r8i1zwx3748hfc"))))
+    (arguments
+     `(#:cargo-inputs (("rust-glib-sys" ,rust-glib-sys-0.18)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3)
+                       ("rust-system-deps" ,rust-system-deps-6))
+       #:cargo-development-inputs (("rust-shell-words" ,rust-shell-words-1)
+                                   ("rust-tempfile" ,rust-tempfile-3))))))
+
 (define-public rust-gsk4-0.7
   (package
     (name "rust-gsk4")
-- 
2.46.0