summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-09-05 20:25:38 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-09-06 15:46:03 +0300
commit9a5ee9928a9de0183ed1702160035319fe1d2407 (patch)
treeca720a9555f3f24e1bd949dc64f0c8821cc83f00 /gnu/packages
parentcef7de6fa61761f905876414debca94cadb01e07 (diff)
gnu: Add rust-clang-sys.
* gnu/packages/crates-io.scm (rust-clang-sys): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/crates-io.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c6aee38fd4..4722773d50 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -27,6 +27,7 @@
#:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (gnu packages jemalloc)
+ #:use-module (gnu packages llvm)
#:use-module (gnu packages maths)
#:use-module (gnu packages pkg-config))
@@ -349,6 +350,42 @@ depending on a large number of #[cfg] parameters. Structured like an
(license (list license:asl2.0
license:expat))))
+(define-public rust-clang-sys
+ (package
+ (name "rust-clang-sys")
+ (version "0.28.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "clang-sys" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ls8zcqi5bmmrvrk3b6r1ym4wlivinbv590d2dvg2xn9f44mbpl1"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-glob" ,rust-glob)
+ ("rust-libc" ,rust-libc)
+ ("rust-libloading" ,rust-libloading))
+ #:cargo-development-inputs
+ (("rust-glob" ,rust-glob))
+ #: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)))
+ (home-page "https://github.com/KyleMayes/clang-sys")
+ (synopsis "Rust bindings for libclang")
+ (description
+ "This package provides Rust bindings for @code{libclang}.")
+ (license license:asl2.0)))
+
(define-public rust-clicolors-control
(package
(name "rust-clicolors-control")