Subject: [bug#73956] [PATCH rust-team 27/27] gnu: Add rust-libadwaita-0.6.

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

* gnu/packages/crates-gtk.scm (rust-libadwaita-0.6): New variable;
(rust-libadwaita-0.5): inherit from rust-libadwaita-0.6.

Change-Id: I3244ee4e3114cdc1a61a1f0e4e1e1f165c131707
---
 gnu/packages/crates-gtk.scm | 40 ++++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index d73dbda005..0cc0a3b998 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -3433,15 +3433,38 @@ (define-public rust-gtk4-sys-0.7
                        ("rust-system-deps" ,rust-system-deps-6))
        #:cargo-development-inputs (("rust-shell-words" ,rust-shell-words-1)
                                    ("rust-tempfile" ,rust-tempfile-3))))))
+
+(define-public rust-libadwaita-0.6
+  (package
+    (name "rust-libadwaita")
+    (version "0.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "libadwaita" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0955c0zryz7xjkkrvbn6z4lmlqgf1vykjbnjndapbcni38zz1zyv"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.20)
+                       ("rust-gdk4" ,rust-gdk4-0.7)
+                       ("rust-gio" ,rust-gio-0.20)
+                       ("rust-glib" ,rust-glib-0.20)
+                       ("rust-gtk4" ,rust-gtk4-0.7)
+                       ("rust-libadwaita-sys" ,rust-libadwaita-sys-0.6)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-pango" ,rust-pango-0.20))))
     (native-inputs (list pkg-config))
-    (inputs (list cairo gdk-pixbuf graphene gtk pango))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "FFI bindings of GTK 4")
-    (description "This package provides FFI bindings of GTK 4.")
+    (inputs (list libadwaita))
+    (home-page "https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs")
+    (synopsis "Rust bindings for libadwaita")
+    (description "Rust bindings for libadwaita.")
     (license license:expat)))
 
 (define-public rust-libadwaita-0.5
   (package
+    (inherit rust-libadwaita-0.6)
     (name "rust-libadwaita")
     (version "0.5.3")
     (source
@@ -3451,7 +3474,6 @@ (define-public rust-libadwaita-0.5
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "174pzn9dwsk8ikvrhx13vkh0zrpvb3rhg9yd2q5d2zjh0q6fgrrg"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs (("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.18)
                        ("rust-gdk4" ,rust-gdk4-0.7)
@@ -3460,13 +3482,7 @@ (define-public rust-libadwaita-0.5
                        ("rust-gtk4" ,rust-gtk4-0.7)
                        ("rust-libadwaita-sys" ,rust-libadwaita-sys-0.5)
                        ("rust-libc" ,rust-libc-0.2)
-                       ("rust-pango" ,rust-pango-0.18))))
-    (native-inputs (list pkg-config))
-    (inputs (list libadwaita))
-    (home-page "https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs")
-    (synopsis "Rust bindings for libadwaita")
-    (description "Rust bindings for libadwaita.")
-    (license license:expat)))
+                       ("rust-pango" ,rust-pango-0.18))))))
 
 (define-public rust-libadwaita-sys-0.6
   (package
-- 
2.46.0