Subject: [PATCHv2 rust-team 07/27] gnu: Add rust-glib-macros-0.20.

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

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

Change-Id: I07a067580461208e78f059dbcfcde5c99e90554c
---
 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 9ef2ba62a7..1cb41e3527 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -1829,17 +1829,22 @@ (define-public rust-glib-0.9
        #:cargo-development-inputs
        (("rust-tempfile" ,rust-tempfile-3))))))
 
-(define-public rust-glib-macros-0.19
+(define-public rust-glib-macros-0.20
   (package
     (name "rust-glib-macros")
-    (version "0.19.9")
+    (version "0.20.4")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "glib-macros" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "1mzsh8jkg8vldvgvr9gsaidvn2myn5cbdn8a6m8rgbhlg8kv0aa4"))))
+        (base32 "1mqwhk5qnd9vbvsb335n1j6m5pbqnfycm7b3jxhhlwnm1kvqigx6"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (substitute* "Cargo.toml"
+             (("version = \"2.0.68\"") "version = \">= 2.0\""))))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs (("rust-heck" ,rust-heck-0.5)
@@ -1847,7 +1852,7 @@ (define-public rust-glib-macros-0.19
                        ("rust-proc-macro2" ,rust-proc-macro2-1)
                        ("rust-quote" ,rust-quote-1)
                        ("rust-syn" ,rust-syn-2))
-       #:cargo-development-inputs (("rust-glib" ,rust-glib-0.19)
+       #:cargo-development-inputs (("rust-glib" ,rust-glib-0.20)
                                    ("rust-trybuild2" ,rust-trybuild2-1))))
     (native-inputs (list pkg-config))
     (inputs (list glib))
@@ -1857,6 +1862,27 @@ (define-public rust-glib-macros-0.19
      "This package provides Rust bindings for the GLib library, proc macros crate.")
     (license license:expat)))
 
+(define-public rust-glib-macros-0.19
+  (package
+    (inherit rust-glib-macros-0.20)
+    (name "rust-glib-macros")
+    (version "0.19.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "glib-macros" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1mzsh8jkg8vldvgvr9gsaidvn2myn5cbdn8a6m8rgbhlg8kv0aa4"))))
+    (arguments
+     `(#:cargo-inputs (("rust-heck" ,rust-heck-0.5)
+                       ("rust-proc-macro-crate" ,rust-proc-macro-crate-3)
+                       ("rust-proc-macro2" ,rust-proc-macro2-1)
+                       ("rust-quote" ,rust-quote-1)
+                       ("rust-syn" ,rust-syn-2))
+       #:cargo-development-inputs (("rust-glib" ,rust-glib-0.19)
+                                   ("rust-trybuild2" ,rust-trybuild2-1))))))
+
 (define-public rust-glib-macros-0.18
   (package
     (inherit rust-glib-macros-0.19)
-- 
2.46.0