Subject: [PATCH v2 44/52] gnu: Add rust-atk-sys-0.10.

From: Leo Prikler <[email-masked]>
Date: Mon, 1 Mar 2021 10:11:12 +0100

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

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index dba3fb8cfd..fafd1d977e 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -36,8 +36,52 @@
 ;;; Please: Try to add new module packages in alphabetic order.
 ;;;
 
+(define-public rust-atk-sys-0.10
+  (package
+    (name "rust-atk-sys")
+    (version "0.10.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "atk-sys" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1knzvq2jdkx1nav619jbqsx2ivzh901rsp2wl57wr50x2fpy8c7m"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-glib-sys" ,rust-glib-sys-0.10)
+        ("rust-gobject-sys" ,rust-gobject-sys-0.10)
+        ("rust-libc" ,rust-libc-0.2)
+        ("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)
+       ("glib" ,glib)))
+    (home-page "http://gtk-rs.org/")
+    (synopsis "FFI bindings to libatk-1")
+    (description "FFI bindings to libatk-1")
+    (license license:expat)))
+
 (define-public rust-atk-sys-0.9
   (package
+    (inherit rust-atk-sys-0.10)
     (name "rust-atk-sys")
     (version "0.9.1")
     (source
@@ -57,14 +101,7 @@
         ("rust-pkg-config" ,rust-pkg-config-0.3))
        #:cargo-development-inputs
        (("rust-shell-words" ,rust-shell-words-0.1)
-        ("rust-tempfile" ,rust-tempfile-3))))
-    (inputs
-     `(("atk" ,atk)
-       ("glib" ,glib)))
-    (home-page "http://gtk-rs.org/")
-    (synopsis "FFI bindings to libatk-1")
-    (description "FFI bindings to libatk-1")
-    (license license:expat)))
+        ("rust-tempfile" ,rust-tempfile-3))))))
 
 (define-public rust-atk-0.8
   (package
-- 
2.30.1