Patchwork [09/12] gnu: Add rust-libc.

login
register
mail settings
Submitter David Craven
Date Dec. 11, 2016, 5:25 p.m.
Message ID <20161211172537.23315-10-david@craven.ch>
Download mbox | patch
Permalink /patch/18360/
State New
Headers show

Comments

David Craven - Dec. 11, 2016, 5:25 p.m.
* gnu/packages/rust.scm (rust-libc): New variable.
---
 gnu/packages/rust.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
Ludovic Courtès - Dec. 13, 2016, 10:48 p.m.
David Craven <david@craven.ch> skribis:

> * gnu/packages/rust.scm (rust-libc): New variable.

[...]

> +    (license (list license:expat license:asl2.0))))

Please clarify what this means.

Otherwise LGTM, thanks!

Ludo’.

Patch

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 8bbb5d116..acff15e6f 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -27,6 +27,7 @@ 
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages python)
   #:use-module (gnu packages version-control)
+  #:use-module (guix build-system cargo)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix download)
@@ -269,3 +270,22 @@  to be deprecated.")
 fast, prevents segfaults, and guarantees thread safety.")
     (home-page "https://www.rust-lang.org")
     (license (list license:asl2.0 license:expat))))
+
+(define-public rust-libc
+  (package
+    (name "rust-libc")
+    (version "0.2.16")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "libc" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "139fl308mb5wxap5fyd5c7n779a60sc1fi8wgdv0zvihrv519020"))))
+    (build-system cargo-build-system)
+    (home-page "https://github.com/rust-lang/libc")
+    (synopsis
+     "Types and bindings to native C functions")
+    (description "This package provides a library for types and bindings to
+native C functions often found in libc or other common platform libraries.")
+    (license (list license:expat license:asl2.0))))