[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: gnu: Add rust-libc.
From: |
guix-commits |
Subject: |
01/04: gnu: Add rust-libc. |
Date: |
Sat, 24 Aug 2019 10:58:47 -0400 (EDT) |
ngz pushed a commit to branch master
in repository guix.
commit 9119f7aba8f254aeb892e9c670fbf6f541b90607
Author: Nicolas Goaziou <address@hidden>
Date: Sat Aug 24 11:29:53 2019 +0200
gnu: Add rust-libc.
* gnu/packages/crates-io.scm (rust-libc): New variable.
---
gnu/packages/crates-io.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 6500adb..c549205 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Ivan Petkov <address@hidden>
;;; Copyright © 2019 Efraim Flashner <address@hidden>
+;;; Copyright © 2019 Nicolas Goaziou <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -313,6 +314,38 @@ friction with idiomatic Rust structs to ease
interopability.")
(license (list license:asl2.0
license:expat))))
+(define-public rust-libc
+ (package
+ (name "rust-libc")
+ (version "0.2.62")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "libc" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1fh69kpjg8hqff36kdczx7sax98gk4qs4ws1dwvjz0rgip0d5z1l"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core))))
+ (home-page "https://github.com/rust-lang/libc")
+ (synopsis "Raw FFI bindings to platform libraries like libc")
+ (description
+ "libc provides all of the definitions necessary to easily
+interoperate with C code (or \"C-like\" code) on each of the platforms
+that Rust supports. This includes type definitions (e.g., c_int),
+constants (e.g., EINVAL) as well as function headers (e.g., malloc).
+
+This crate exports all underlying platform types, functions, and
+constants under the crate root, so all items are accessible as
+@samp{libc::foo}. The types and values of all the exported APIs match
+the platform that libc is compiled for.")
+ (license (list license:expat
+ license:asl2.0))))
+
(define-public rust-maplit
(package
(name "rust-maplit")
@@ -950,3 +983,4 @@ x86_64-pc-windows-gnu target. Please don't use this crate
directly, depend on
@code{winapi} instead.")
(license (list license:asl2.0
license:expat))))
+