From 02f66e9022d92d2041869231ee5adcf6009f07a9 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 5 Sep 2019 17:59:43 +0300 Subject: [PATCH] gnu: Add rust-gcc. * gnu/packages/crates-io.scm (rust-gcc): New variable. --- gnu/packages/crates-io.scm | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) 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")