Subject: [bug#44492] [PATCH 46/52] gnu: Add rust-gtk-sys-0.10.

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

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

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index 96dc0682ed..8c6afef91e 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -1658,6 +1658,59 @@ used for inter-process communication.")
      "LGPL-licensed docs for Gtk-rs crates.")
     (license license:lgpl2.0)))
 
+(define-public rust-gtk-sys-0.10
+  (package
+    (name "rust-gtk-sys")
+    (version "0.10.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gtk-sys" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0mq4i161kk6dwiz19ayxgm9fhx7n3r5lm9lbjiyk0qs811pxmb49"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f ; TODO: ABI mismatch
+       #:cargo-inputs
+       (("rust-atk-sys" ,rust-atk-sys-0.10)
+        ("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.10)
+        ("rust-gdk-pixbuf-sys" ,rust-gdk-pixbuf-sys-0.10)
+        ("rust-gdk-sys" ,rust-gdk-sys-0.10)
+        ("rust-gio-sys" ,rust-gio-sys-0.10)
+        ("rust-glib-sys" ,rust-glib-sys-0.10)
+        ("rust-gobject-sys" ,rust-gobject-sys-0.10)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-pango-sys" ,rust-pango-sys-0.10)
+        ("rust-system-deps" ,rust-system-deps-1))
+       #:cargo-development-inputs
+       (("rust-shell-words" ,rust-shell-words-0.1)
+        ("rust-tempfile" ,rust-tempfile-3))
+       #: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 "FFI bindings to libgtk-3")
+    (description "This package provides FFI bindings to libgtk-3.")
+    (license license:expat)))
+
 (define-public rust-gtk-sys-0.9
   (package
     (name "rust-gtk-sys")
-- 
2.30.1