Subject: [PATCH 47/52] gnu: Add rust-gtk-0.9.

From: Leo Prikler <[email-masked]>
Date: Wed, 24 Feb 2021 12:11:30 +0100

* gnu/packages/crates-gtk.scm (rust-gtk-0.9): New variable.
---
 gnu/packages/crates-gtk.scm | 64 +++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index 8c6afef91e..5b4f85949e 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -1589,6 +1589,70 @@ used for inter-process communication.")
     (description "FFI bindings to libgstvideo-1.0")
     (license license:expat)))
 
+(define-public rust-gtk-0.9
+  (package
+    (name "rust-gtk")
+    (version "0.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gtk" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0smdll32vlamp4kvxa6sg5m653icas21jd36fvq3laq7ahh2y0ig"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-atk" ,rust-atk-0.9)
+        ("rust-bitflags" ,rust-bitflags-1)
+        ("rust-cairo-rs" ,rust-cairo-rs-0.9)
+        ("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.10)
+        ("rust-cc" ,rust-cc-1)
+        ("rust-gdk" ,rust-gdk-0.13)
+        ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.9)
+        ("rust-gdk-pixbuf-sys" ,rust-gdk-pixbuf-sys-0.10)
+        ("rust-gdk-sys" ,rust-gdk-sys-0.10)
+        ("rust-gio" ,rust-gio-0.9)
+        ("rust-gio-sys" ,rust-gio-sys-0.10)
+        ("rust-glib" ,rust-glib-0.10)
+        ("rust-glib-sys" ,rust-glib-sys-0.10)
+        ("rust-gobject-sys" ,rust-gobject-sys-0.10)
+        ("rust-gtk-rs-lgpl-docs"
+         ,rust-gtk-rs-lgpl-docs-0.1)
+        ("rust-gtk-sys" ,rust-gtk-sys-0.10)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-once-cell" ,rust-once-cell-1)
+        ("rust-pango" ,rust-pango-0.9)
+        ("rust-pango-sys" ,rust-pango-sys-0.10)
+        ("rust-pkg-config" ,rust-pkg-config-0.3))
+       #:cargo-development-inputs
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'fix-version-requirements
+           (lambda* (#:key inputs vendor-dir #:allow-other-keys)
+             (substitute*
+                 (map
+                  (lambda (dir) (string-append dir "/Cargo.toml"))
+                  (find-files vendor-dir "system-deps.*" #:directories? #t))
+               (("0.0.10") ,(package-version rust-version-compare-0.0)))
+             #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("atk" ,atk)
+       ("cairo" ,cairo)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("pango" ,pango)))
+    (home-page "http://gtk-rs.org/")
+    (synopsis "Rust bindings for the GTK+ 3 library")
+    (description
+      "Rust bindings for the GTK+ 3 library")
+    (license license:expat)))
+
 (define-public rust-gtk-0.8
   (package
     (name "rust-gtk")
-- 
2.30.1