summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-12-27 09:45:00 +0200
committerEfraim Flashner <efraim@flashner.co.il>2024-02-20 13:56:50 +0200
commita75eab26756661ccffb0a2d9063d6709da9ca251 (patch)
treebc465a46d086669b7ca65e57a4d5b820abff219c
parent6845b4148d3394e375b33c1d2259b59d4e2e2be5 (diff)
gnu: rust-rust-hawktracer-sys-0.4: Generate bindings during build.
* gnu/packages/crates-io.scm (rust-rust-hawktracer-sys-0.4)[source]: Add snippet to use a newer version of rust-bindgen, remove pre-generated bindings and fix building bundled library. [arguments]: Don't skip the build. [cargo-inputs]: Replace rust-bindgen-0.37 with 0.56. [native-inputs]: Add clang, cmake-minimal. Change-Id: I01dd8b5b13aa449977f53296fc843153e409a1ea
-rw-r--r--gnu/packages/crates-io.scm29
1 files changed, 23 insertions, 6 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 8693448948..f54f2b0727 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -67140,18 +67140,35 @@ the file-system during development.")
(string-append name "-" version ".tar.gz"))
(sha256
(base32
- "15acrj881y2g7cwsgf1nr22cixrknp8m4x08dkx1an6zf4q8bk37"))))
+ "15acrj881y2g7cwsgf1nr22cixrknp8m4x08dkx1an6zf4q8bk37"))
+ (snippet
+ #~(begin (use-modules (guix build utils))
+ (delete-file "pregenerated_bindings.rs")
+ ;; TODO: Unbundle hawktracer
+ (substitute* "Cargo.toml"
+ (("0\\.37\\.0") "0.56")
+ ;; Generate the bindings by default since we delete the
+ ;; pregenerated bindings.
+ (("\\[features\\]")
+ "[features]\ndefault = ['generate_bindings']"))
+ (substitute* "build.rs"
+ (("( +)\\.generate" _ space)
+ (string-append space ".size_t_is_usize(true)\n"
+ space ".generate")))
+ (substitute* "hawktracer/CMakeLists.txt"
+ (("(ENABLE_DOC.*) ON" _ enable_doc)
+ (string-append enable_doc " OFF")))))))
(build-system cargo-build-system)
(arguments
- `(#:skip-build? #t
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-cmake" ,rust-cmake-0.1)
("rust-pkg-config" ,rust-pkg-config-0.3)
- ("rust-bindgen" ,rust-bindgen-0.37)
+ ("rust-bindgen" ,rust-bindgen-0.56)
("rust-itertools" ,rust-itertools-0.8))))
+ (native-inputs
+ (list clang cmake-minimal))
(home-page "https://github.com/AlexEne/rust_hawktracer_sys")
- (synopsis
- "Sys crate for the rust_hawktracer library")
+ (synopsis "Sys crate for the rust_hawktracer library")
(description
"This package provides a sys crate for the rust_hawktracer library.")
(license (list license:expat license:asl2.0))))