Subject: [bug#73956] [PATCH rust-team 08/27] gnu: Add rust-glib-0.20.

From: Giacomo Leidi <[email-masked]>
Date: Wed, 23 Oct 2024 01:30:53 +0200

* gnu/packages/crates-gtk.scm (rust-glib-0.20): New variable.
(rust-glib-0.19): inherit from rust-glib-0.20.

Change-Id: I3b25b24922d7fed60376c82f21f3c3ff16a1cc55
---
 gnu/packages/crates-gtk.scm | 53 +++++++++++++++++++++++++++++++------
 1 file changed, 45 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index 1cb41e3527..5dcb9ec6d2 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -1586,32 +1586,32 @@ (define-public rust-gir-format-check-0.1
     (description "File format checker in Rust.")
     (license license:expat)))
 
-(define-public rust-glib-0.19
+(define-public rust-glib-0.20
   (package
     (name "rust-glib")
-    (version "0.19.9")
+    (version "0.20.4")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "glib" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "0i2ak1scmzfmfxbm2dr146jl4y9mafxf1ald05jr8iimy5wh4r9r"))))
+        (base32 "1zw5xd2772vakf95pslvzmmnzg6f9wnj9vkcpkyzj2v5sg31xkxd"))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-test-flags
        '("--release" "--"
          "--skip=structured_log")
-       #:cargo-inputs (("rust-bitflags" ,rust-bitflags-2)
+       #:cargo-inputs (("rust-bitflags" ,rust-bitflags-2.6)
                        ("rust-futures-channel" ,rust-futures-channel-0.3)
                        ("rust-futures-core" ,rust-futures-core-0.3)
                        ("rust-futures-executor" ,rust-futures-executor-0.3)
                        ("rust-futures-task" ,rust-futures-task-0.3)
                        ("rust-futures-util" ,rust-futures-util-0.3)
-                       ("rust-gio-sys" ,rust-gio-sys-0.19)
-                       ("rust-glib-macros" ,rust-glib-macros-0.19)
-                       ("rust-glib-sys" ,rust-glib-sys-0.19)
-                       ("rust-gobject-sys" ,rust-gobject-sys-0.19)
+                       ("rust-gio-sys" ,rust-gio-sys-0.20)
+                       ("rust-glib-macros" ,rust-glib-macros-0.20)
+                       ("rust-glib-sys" ,rust-glib-sys-0.20)
+                       ("rust-gobject-sys" ,rust-gobject-sys-0.20)
                        ("rust-libc" ,rust-libc-0.2)
                        ("rust-log" ,rust-log-0.4)
                        ("rust-memchr" ,rust-memchr-2)
@@ -1629,6 +1629,43 @@ (define-public rust-glib-0.19
     (description "This package provides Rust bindings for the GLib library.")
     (license license:expat)))
 
+(define-public rust-glib-0.19
+  (package
+    (inherit rust-glib-0.20)
+    (name "rust-glib")
+    (version "0.19.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "glib" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0i2ak1scmzfmfxbm2dr146jl4y9mafxf1ald05jr8iimy5wh4r9r"))))
+    (arguments
+     `(#:cargo-test-flags
+       '("--release" "--"
+         "--skip=structured_log")
+       #:cargo-inputs (("rust-bitflags" ,rust-bitflags-2)
+                       ("rust-futures-channel" ,rust-futures-channel-0.3)
+                       ("rust-futures-core" ,rust-futures-core-0.3)
+                       ("rust-futures-executor" ,rust-futures-executor-0.3)
+                       ("rust-futures-task" ,rust-futures-task-0.3)
+                       ("rust-futures-util" ,rust-futures-util-0.3)
+                       ("rust-gio-sys" ,rust-gio-sys-0.19)
+                       ("rust-glib-macros" ,rust-glib-macros-0.19)
+                       ("rust-glib-sys" ,rust-glib-sys-0.19)
+                       ("rust-gobject-sys" ,rust-gobject-sys-0.19)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-log" ,rust-log-0.4)
+                       ("rust-memchr" ,rust-memchr-2)
+                       ("rust-smallvec" ,rust-smallvec-1)
+                       ("rust-thiserror" ,rust-thiserror-1))
+       #:cargo-development-inputs
+       (("rust-criterion" ,rust-criterion-0.5)
+        ("rust-gir-format-check" ,rust-gir-format-check-0.1)
+        ("rust-tempfile" ,rust-tempfile-3)
+        ("rust-trybuild2" ,rust-trybuild2-1))))))
+
 (define-public rust-glib-0.18
   (package
     (inherit rust-glib-0.19)
-- 
2.46.0