Re: [PATCH 01/86] gnu: Add rust-libc.

2017-01-03 Thread Danny Milosavljevic
Also, there are tests in 
https://github.com/rust-lang/libc/archive/0.2.18.tar.gz but not in the 0.2.18 
crate. I haven't managed to run them successfully yet.

It's supposed to work like this:

$ cd libc-test
$ cargo run

I get

Unknown error
Permission denied.

See also 




Re: [PATCH 01/86] gnu: Add rust-libc.

2017-01-03 Thread Danny Milosavljevic
> +(license (list license:expat license:asl2.0

Please clarify whether that means AND or OR in a comment.

Other than that, OK!



[PATCH 01/86] gnu: Add rust-libc.

2017-01-03 Thread ng0
* gnu/packages/rust.scm (rust-libc): New variable.
---
 gnu/packages/rust.scm | 23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 8aa867317..2137ba601 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 David Craven 
 ;;; Copyright © 2016 Eric Le Bihan 
-;;; Copyright © 2016 ng0 
+;;; Copyright © 2016, 2017 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,6 +31,7 @@
   #:use-module (gnu packages version-control)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system cargo)
   #:use-module (guix download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -265,3 +266,23 @@ safety and thread safety guarantees.")
 (home-page "https://www.rust-lang.org";)
 ;; Dual licensed.
 (license (list license:asl2.0 license:expat
+
+(define-public rust-libc
+  (package
+(name "rust-libc")
+(version "0.2.18")
+(source
+ (origin
+   (method url-fetch)
+   (uri (crate-uri "libc" version))
+   (file-name (string-append name "-" version ".tar.gz"))
+   (sha256
+(base32
+ "0w5cghr0wx3hi2sclk8r9iyzlbxsakil87ada40q2ykyhky24655"
+(build-system cargo-build-system)
+(home-page "https://github.com/rust-lang/libc";)
+(synopsis "Raw bindings to platform APIs for Rust")
+(description
+ "Libc 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
-- 
2.11.0