aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-09-05 16:52:02 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-09-06 15:45:58 +0300
commit5bd7965e115b473ad74ab22cb07364394a990ffc (patch)
tree7cdacd638ba87724e92b1ce7c1dc859eb29a72a5 /gnu/packages
parent313778655e4a3bd69febb1af486513dc8d25e2f6 (diff)
downloadguix-5bd7965e115b473ad74ab22cb07364394a990ffc.tar
guix-5bd7965e115b473ad74ab22cb07364394a990ffc.tar.gz
gnu: Add rust-cc.
* gnu/packages/crates-io.scm (rust-cc): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/crates-io.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ab022abc29..9b715c7cf9 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -230,6 +230,45 @@ behave like a set of bitflags.")
(license (list license:asl2.0
license:expat))))
+(define-public rust-cc
+ (package
+ (name "rust-cc")
+ (version "1.0.41")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "cc" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1zxzd559dbbf1iwdzmkj7czapzccs17kqqmsj9ayijpdix5rrbld"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(;#:cargo-inputs
+ ;(("rust-rayon" ,rust-rayon))
+ #:cargo-development-inputs
+ (("rust-tempdir" ,rust-tempdir))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-optional-deps
+ (lambda _
+ (substitute* "Cargo.toml.orig"
+ ((".*optional.*") "\n")
+ ((".*features.*") "")
+ ((".*parallel.*") ""))
+ (delete-file "Cargo.toml")
+ (copy-file "Cargo.toml.orig" "Cargo.toml")
+ #t)))
+ #:tests? #f)) ; Tests require cc-test from git repo.
+ (home-page "https://github.com/alexcrichton/cc-rs")
+ (synopsis "Invoke the native C compiler")
+ (description
+ "This package provides a build-time dependency for Cargo build scripts to
+assist in invoking the native C compiler to compile native C code into a static
+archive to be linked into Rustcode.")
+ (license (list license:asl2.0
+ license:expat))))
+
(define-public rust-cfg-if
(package
(name "rust-cfg-if")