summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-09-05 17:59:43 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-09-06 15:46:00 +0300
commit02f66e9022d92d2041869231ee5adcf6009f07a9 (patch)
treebe04f55e9aa1ef44a0a45296782668402643c9fc
parentf51c47b528a7acf79dd189e18cebf841afaf4c30 (diff)
downloadpatches-02f66e9022d92d2041869231ee5adcf6009f07a9.tar
patches-02f66e9022d92d2041869231ee5adcf6009f07a9.tar.gz
gnu: Add rust-gcc.
* gnu/packages/crates-io.scm (rust-gcc): New variable.
-rw-r--r--gnu/packages/crates-io.scm40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index f0a29486ad..ea43d8e5e1 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -802,6 +802,46 @@ the computation on the threads themselves.")
(license (list license:asl2.0
license:expat))))
+(define-public rust-gcc
+ (package
+ (inherit rust-cc)
+ (name "rust-gcc")
+ (version "0.3.55")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "gcc" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hng1sajn4r67hndvhjysswz8niayjwvcj42zphpxzhbz89kjpwg"))))
+ (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))
+ (home-page "https://github.com/alexcrichton/cc-rs")
+ (synopsis "Library to compile C/C++ code into a Rust library/application")
+ (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-heapsize
(package
(name "rust-heapsize")