Subject: [bug#71278] [PATCH 29/44] gnu: Add rust-gdk-0.17.

From: Murilo <[email-masked]>
Date: Thu, 30 May 2024 12:17:56 -0300

* gnu/packages/crates-gtk.scm (rust-gdk-0.17): New variable.

Change-Id: If78874c39c5bcf96e08495cbd19d37bce338e9b3
---
 gnu/packages/crates-gtk.scm | 40 +++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index ae64aa3c09..45b2bb6bb6 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -458,8 +458,39 @@ (define-public rust-cairo-sys-rs-0.9
         ("rust-x11" ,rust-x11-2)
         ("rust-pkg-config" ,rust-pkg-config-0.3))))))
 
+(define-public rust-gdk-0.17
+  (package
+    (name "rust-gdk")
+    (version "0.17.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gdk" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1lvl9i2lz95gw00jdlaz5ysp90lnciaqncwp10x7xkfcabmga7dy"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs (("rust-bitflags" ,rust-bitflags-1)
+                       ("rust-cairo-rs" ,rust-cairo-rs-0.17)
+                       ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.17)
+                       ("rust-gdk-sys" ,rust-gdk-sys-0.17)
+                       ("rust-gio" ,rust-gio-0.17)
+                       ("rust-glib" ,rust-glib-0.17)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-pango" ,rust-pango-0.17))
+       #:cargo-development-inputs (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
+    (inputs
+     (list cairo gdk-pixbuf glib gtk+ pango))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "Rust bindings for the GDK 3 library")
+    (description "This package provides Rust bindings for the GDK 3 library.")
+    (license license:expat)))
+
 (define-public rust-gdk-0.14
   (package
+    (inherit rust-gdk-0.17)
     (name "rust-gdk")
     (version "0.14.3")
     (source
@@ -469,7 +500,6 @@ (define-public rust-gdk-0.14
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "0fwkm4glh7cici6yd96qlddyp4s2l029wa1sgh6xxn00zkf4kmxr"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:skip-build?
        #t
@@ -483,13 +513,7 @@ (define-public rust-gdk-0.14
         ("rust-libc" ,rust-libc-0.2)
         ("rust-pango" ,rust-pango-0.14))
        #:cargo-development-inputs
-       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
-    (inputs
-     (list cairo gdk-pixbuf glib gtk+ pango))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "Rust bindings for the GDK 3 library")
-    (description "This package provides Rust bindings for the GDK 3 library.")
-    (license license:expat)))
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
 (define-public rust-gdk-0.13
   (package
-- 
2.41.0