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

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

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

Change-Id: I7ca29c65f911d9f46fb06629fe59bc630f9c8b77
---
 gnu/packages/crates-gtk.scm | 46 +++++++++++++++++++++++++++++--------
 1 file changed, 37 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index e788d84837..728774ec02 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -2663,8 +2663,44 @@ (define-public rust-gtk-rs-lgpl-docs-0.1
      "LGPL-licensed docs for Gtk-rs crates.")
     (license license:lgpl2.0)))
 
+(define-public rust-gtk-sys-0.17
+  (package
+    (name "rust-gtk-sys")
+    (version "0.17.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gtk-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0zixvr0yribq0vr9gkq7mqgx74ydq448sd7ph1lpwniyp6jbd3jd"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs (("rust-system-deps" ,rust-system-deps-6)
+                       ("rust-pango-sys" ,rust-pango-sys-0.17)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-gobject-sys" ,rust-gobject-sys-0.17)
+                       ("rust-glib-sys" ,rust-glib-sys-0.17)
+                       ("rust-gio-sys" ,rust-gio-sys-0.17)
+                       ("rust-gdk-sys" ,rust-gdk-sys-0.17)
+                       ("rust-gdk-pixbuf-sys" ,rust-gdk-pixbuf-sys-0.17)
+                       ("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.17)
+                       ("rust-atk-sys" ,rust-atk-sys-0.17))
+       #:cargo-development-inputs
+       (("rust-shell-words" ,rust-shell-words-1)
+        ("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs (list pkg-config))
+    (inputs
+     (list gtk+))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "FFI bindings to libgtk-3")
+    (description "This package provides FFI bindings to libgtk-3.")
+    (license license:expat)))
+
 (define-public rust-gtk-sys-0.14
   (package
+    (inherit rust-gtk-sys-0.17)
     (name "rust-gtk-sys")
     (version "0.14.0")
     (source
@@ -2674,7 +2710,6 @@ (define-public rust-gtk-sys-0.14
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "0gihp9zh4z7lycp0zbmq1w0k9ddbnd2h64jsgid7hi85vb9wh54c"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:tests? #f                      ;missing files
        #:cargo-inputs
@@ -2690,14 +2725,7 @@ (define-public rust-gtk-sys-0.14
         ("rust-system-deps" ,rust-system-deps-3))
        #:cargo-development-inputs
        (("rust-shell-words" ,rust-shell-words-1)
-        ("rust-tempfile" ,rust-tempfile-3))))
-    (native-inputs (list pkg-config))
-    (inputs
-     (list gtk+))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "FFI bindings to libgtk-3")
-    (description "This package provides FFI bindings to libgtk-3.")
-    (license license:expat)))
+        ("rust-tempfile" ,rust-tempfile-3))))))
 
 (define-public rust-gtk-sys-0.10
   (package
-- 
2.41.0