aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authoraurtzy <aurtzy@gmail.com>2024-03-08 15:27:15 -0500
committerEfraim Flashner <efraim@flashner.co.il>2024-03-12 13:48:28 +0200
commit4ef63d7ed0ae1ae29c97cb16f63c537c70473dcf (patch)
treea686d09bd70387a1a4514fb7c93318124e021669 /gnu
parenta52701a4d3c90327f6b88267173a5a98ef3db8e6 (diff)
downloadguix-4ef63d7ed0ae1ae29c97cb16f63c537c70473dcf.tar.gz
guix-4ef63d7ed0ae1ae29c97cb16f63c537c70473dcf.zip
gnu: Add rust-bindgen-cli-0.69.
* gnu/packages/rust-apps.scm (rust-bindgen-cli): New variable. (rust-bindgen): Remove this package. Change-Id: I0841f34d73acf4e161c9f0ba0c6543d7f0d03092 Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/rust-apps.scm45
1 files changed, 23 insertions, 22 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 7d09633c5d..8785659777 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1843,42 +1843,43 @@ rebase.")
(define-public rust-cbindgen rust-cbindgen-0.26)
-;; This is the unversioned package of the latest version of bindgen.
-(define-public rust-bindgen
+(define-public rust-bindgen-cli
(package
- (name "rust-bindgen")
+ (name "rust-bindgen-cli")
(version "0.69.4")
(source
(origin
(method url-fetch)
- (uri (crate-uri "bindgen" version))
+ (uri (crate-uri "bindgen-cli" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
- (base32 "18194611hn3k1dkxlha7a52sr8vmfhl9blc54xhj08cahd8wh3d0"))))
+ (base32 "00dfny07m4xfnqbfn7yr7cqwilj6935lbyg5d39yxjfj8jglfcax"))))
(build-system cargo-build-system)
(arguments
`(#:install-source? #f
- #:cargo-inputs (("rust-annotate-snippets" ,rust-annotate-snippets-0.9)
- ("rust-bitflags" ,rust-bitflags-2)
- ("rust-cexpr" ,rust-cexpr-0.6)
- ("rust-clang-sys" ,rust-clang-sys-1)
- ("rust-itertools" ,rust-itertools-0.10)
- ("rust-lazy-static" ,rust-lazy-static-1)
- ("rust-lazycell" ,rust-lazycell-1)
+ #:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.69)
+ ("rust-clap" ,rust-clap-4)
+ ("rust-clap-complete" ,rust-clap-complete-4)
+ ("rust-env-logger" ,rust-env-logger-0.10)
("rust-log" ,rust-log-0.4)
- ("rust-prettyplease" ,rust-prettyplease-0.2)
- ("rust-proc-macro2" ,rust-proc-macro2-1)
- ("rust-quote" ,rust-quote-1)
- ("rust-regex" ,rust-regex-1)
- ("rust-rustc-hash" ,rust-rustc-hash-1)
- ("rust-shlex" ,rust-shlex-1)
- ("rust-syn" ,rust-syn-2)
- ("rust-which" ,rust-which-4))))
- (inputs (list clang))
+ ("rust-shlex" ,rust-shlex-1))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
+ (bindgen (string-append bin "/bindgen"))
+ (llvm-dir (string-append
+ (assoc-ref inputs "clang") "/lib")))
+ (install-file "target/release/bindgen" bin)
+ (wrap-program bindgen
+ `("LIBCLANG_PATH" = (,llvm-dir)))))))))
+ (inputs (list bash-minimal clang))
(home-page "https://rust-lang.github.io/rust-bindgen/")
(synopsis "Generate Rust FFI bindings to C and C++ libraries")
(description "This package can be used to automatically generate Rust FFI
-bindings to C and C++ libraries.")
+bindings to C and C++ libraries. This package provides the @command{bindgen}
+command.")
(license license:bsd-3)))
(define-public sniffglue