guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20/41: gnu: Add rust-gcc.


From: guix-commits
Subject: 20/41: gnu: Add rust-gcc.
Date: Fri, 6 Sep 2019 08:47:28 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 02f66e9022d92d2041869231ee5adcf6009f07a9
Author: Efraim Flashner <address@hidden>
Date:   Thu Sep 5 17:59:43 2019 +0300

    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 f0a2948..ea43d8e 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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]