Subject: [PATCH rust-team v3 05/75] gnu: Add rust-xkbcommon-sys-1.

From: Herman Rimm <[email-masked]>
Date: Sat, 4 May 2024 13:34:37 +0200

* gnu/packages/crates-graphics.scm (rust-xkbcommon-sys-1): Add variable.

Change-Id: I7988733ce92750a0062cd8a81437b454f24cf548
---
 gnu/packages/crates-graphics.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index 5705fb1af0..07d00550a9 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -5889,6 +5889,35 @@ (define-public rust-xkbcommon-dl-0.4
      "Dynamically loaded xkbcommon and xkbcommon-x11 Rust bindings.")
     (license license:expat)))
 
+(define-public rust-xkbcommon-sys-1
+  (package
+    (name "rust-xkbcommon-sys")
+    (version "1.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "xkbcommon-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "142ww452qq0q47fmc4khzsd0fbwmb71fjl7pci573zf83fvdpxsn"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.63)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'add-absolute-library-references
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "XKBCOMMON_LIB_DIR"
+                     (assoc-ref inputs "libxkbcommon")))))))
+    (native-inputs (list pkg-config))
+    (inputs (list clang libxkbcommon-1.5))
+    (home-page "https://github.com/meh/rust-xkbcommon-sys")
+    (synopsis "Bindings to libxkbcommon")
+    (description "This package provides bindings to libxkbcommon.")
+    (license license:wtfpl2)))
+
 (define-public rust-xkeysym-0.2
   (package
     (name "rust-xkeysym")
-- 
2.41.0