Subject: [bug#70146] [PATCH 058/147] gnu: Add rust-capstone-sys-0.13.

From: Jean-Pierre De Jesus DIAZ <[email-masked]>
Date: Tue, 2 Apr 2024 18:04:10 +0200

* gnu/packages/crates-io.scm (rust-capstone-sys-0.13): New variable.

Change-Id: I4ca3ea310603f419bdea8c7bb83d72183fd31943
---
 gnu/packages/crates-io.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c728849d6b..205041cb5d 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -9712,6 +9712,32 @@ (define-public rust-caps-0.3
         ("rust-error-chain" ,rust-error-chain-0.12)
         ("rust-libc" ,rust-libc-0.2))))))
 
+;; FIXME: This package contains bundled capstone sources and no easy way
+;; to opt out and use system libraries.
+(define-public rust-capstone-sys-0.13
+  (package
+    (name "rust-capstone-sys")
+    (version "0.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "capstone-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1xpia1gs2b0zl7n521ldq6lax2jqqjw0hz2c8skak94gp2bksbyg"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.53)
+                       ("rust-cc" ,rust-cc-1)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-regex" ,rust-regex-1))))
+    (home-page "https://github.com/capstone-rust/capstone-rs")
+    (synopsis "Low-level bindings to the capstone disassembly library")
+    (description "This package provides a library with low-level bindings
+to the capstone disassembly library")
+    (license license:expat)))
+
 (define-public rust-carapace-spec-clap-0.1
   (package
     (name "rust-carapace-spec-clap")
-- 
2.41.0