Subject: [bug#44492] [PATCH v2 31/52] gnu: Add rust-libhandy-0.5.

From: Leo Prikler <[email-masked]>
Date: Mon, 1 Mar 2021 08:50:09 +0100

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

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index d43669c9da..69277fd208 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -1690,6 +1690,60 @@ renders username initials.")
     (description "This package provides raw FFI bindings to libhandy.")
     (license license:gpl3+)))
 
+(define-public rust-libhandy-0.5
+  (package
+    (name "rust-libhandy")
+    (version "0.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "libhandy" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "01zska4i6641pj8d9gcc2kclx5vvsbbyfpv4rn5kahs11rigba9a"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-gdk" ,rust-gdk-0.12)
+        ("rust-gdk-sys" ,rust-gdk-sys-0.9)
+        ("rust-gio" ,rust-gio-0.8)
+        ("rust-gio-sys" ,rust-gio-sys-0.9)
+        ("rust-glib" ,rust-glib-0.9)
+        ("rust-glib-sys" ,rust-glib-sys-0.9)
+        ("rust-gobject-sys" ,rust-gobject-sys-0.9)
+        ("rust-gtk" ,rust-gtk-0.8)
+        ("rust-gtk-sys" ,rust-gtk-sys-0.9)
+        ("rust-lazy-static" ,rust-lazy-static-1)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-libhandy-sys" ,rust-libhandy-sys-0.5)
+        ("rust-pango" ,rust-pango-0.8))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Tests require a running X server.
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")
+             #t)))))
+    (native-inputs
+     `(("xorg-server" ,xorg-server-for-tests)))
+    (inputs
+     `(("atk" ,atk)
+       ("cairo" ,cairo)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("libhandy" ,(module-ref (resolve-interface '(gnu packages gnome))
+                                'libhandy-0.0))
+       ("pango" ,pango)))
+    (home-page
+     "https://gitlab.gnome.org/World/Rust/libhandy-rs")
+    (synopsis "Rust bindings for libhandy")
+    (description "This package provides Rust bindings for libhandy.")
+    (license license:gpl3+)))
+
 (define-public rust-pango-0.9
   (package
     (name "rust-pango")
-- 
2.30.1