From 15630854fa704069e9768610a663a0b4215c4167 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 11 Feb 2020 16:35:41 +0200 Subject: [PATCH] gnu: rust-clang-0.26: Don't hide package. * gnu/packages/crates-io.scm (rust-clang-0.26)[arguments]: Add rust-glob-0.2, rust-libc-0.2, rust-libloading-0.5 to cargo-inputs. Add custom phase to find libclang. [native-inputs]: Add clang. [properties]: Don't inherit. --- gnu/packages/crates-io.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 6d52b6b1d2..13616bd4fe 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -30,6 +30,7 @@ (define-module (gnu packages crates-io) #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages jemalloc) + #:use-module (gnu packages llvm) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages ssh) @@ -1581,7 +1582,23 @@ (define-public rust-clang-sys-0.26 (file-name (string-append name "-" version ".crate")) (sha256 (base32 - "1r50dwy5hj5gq07dn0qf8222d07qv0970ymx0j8n9779yayc3w3f")))))) + "1r50dwy5hj5gq07dn0qf8222d07qv0970ymx0j8n9779yayc3w3f")))) + (arguments + `(#:cargo-inputs + (("rust-glob" ,rust-glob-0.2) + ("rust-libc" ,rust-libc-0.2) + ("rust-libloading" ,rust-libloading-0.5)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'set-environmental-variable + (lambda* (#:key inputs #:allow-other-keys) + (let ((clang (assoc-ref inputs "libclang"))) + (setenv "LIBCLANG_PATH" + (string-append clang "/lib"))) + #t))))) + (inputs + `(("libclang" ,clang))) + (properties '()))) (define-public rust-clap-2 (package