Subject: [bug#71278] [PATCH v2 31/44] gnu: Add rust-gtk-0.17.

From: Murilo <[email-masked]>
Date: Fri, 31 May 2024 09:38:21 -0300

* gnu/packages/crates-gtk.scm (rust-gtk-0.17): New variable.
* gnu/packages/crates-gtk.scm (rust-gtk-0.14): Update package definition to
inherit from newer version.

Change-Id: I91981dcac908ae073a58d8a6d1d6eb89d095650a
---
 gnu/packages/crates-gtk.scm | 49 +++++++++++++++++++++++++++++++------
 1 file changed, 41 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index db5c143bfa..e788d84837 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -2478,8 +2478,48 @@ (define-public rust-gstreamer-sys-0.18
      "Foreign Function Interface (FFI) bindings to libgstreamer-1.0.")
     (license license:expat)))
 
+(define-public rust-gtk-0.17
+  (package
+    (name "rust-gtk")
+    (version "0.17.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gtk" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0rnrc5k7p3ck1gqcvf58xv77brdlhmhxn3drpb8d821bp4m25i5n"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f ; requires running server
+       #:cargo-inputs (("rust-pkg-config" ,rust-pkg-config-0.3)
+                       ("rust-pango" ,rust-pango-0.17)
+                       ("rust-once-cell" ,rust-once-cell-1)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-gtk3-macros" ,rust-gtk3-macros-0.17)
+                       ("rust-gtk-sys" ,rust-gtk-sys-0.17)
+                       ("rust-glib" ,rust-glib-0.17)
+                       ("rust-gio" ,rust-gio-0.17)
+                       ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.17)
+                       ("rust-gdk" ,rust-gdk-0.17)
+                       ("rust-futures-channel" ,rust-futures-channel-0.3)
+                       ("rust-field-offset" ,rust-field-offset-0.3)
+                       ("rust-cairo-rs" ,rust-cairo-rs-0.17)
+                       ("rust-bitflags" ,rust-bitflags-1)
+                       ("rust-atk" ,rust-atk-0.17))
+       #:cargo-development-inputs
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
+    (native-inputs (list pkg-config))
+    (inputs
+     (list at-spi2-core cairo glib gtk+ pango))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "Rust bindings for the GTK+ 3 library")
+    (description "This package provides Rust bindings for the GTK+ 3 library.")
+    (license license:expat)))
+
 (define-public rust-gtk-0.14
   (package
+    (inherit rust-gtk-0.17)
     (name "rust-gtk")
     (version "0.14.3")
     (source
@@ -2509,14 +2549,7 @@ (define-public rust-gtk-0.14
         ("rust-pango" ,rust-pango-0.14)
         ("rust-pkg-config" ,rust-pkg-config-0.3))
        #:cargo-development-inputs
-       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
-    (native-inputs (list pkg-config))
-    (inputs
-     (list at-spi2-core cairo glib gtk+ pango))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "Rust bindings for the GTK+ 3 library")
-    (description "This package provides Rust bindings for the GTK+ 3 library.")
-    (license license:expat)))
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
 (define-public rust-gtk-0.8
   (package
-- 
2.41.0