gnu: Add rust-pin-utils.
[jackhill/guix/guix.git] / gnu / packages / crates-io.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
3 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages crates-io)
21 #:use-module (guix build-system cargo)
22 #:use-module (guix download)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages))
25
26 ;;;
27 ;;; Please: Try to add new module packages in alphabetic order.
28 ;;;
29
30 (define-public rust-autocfg
31 (package
32 (name "rust-autocfg")
33 (version "0.1.5")
34 (source
35 (origin
36 (method url-fetch)
37 (uri (crate-uri "autocfg" version))
38 (file-name (string-append name "-" version ".tar.gz"))
39 (sha256
40 (base32
41 "0asl6fnc35yk5l2rxwhp25v128jgm45dp754h9z8x51b6n90w4r2"))))
42 (build-system cargo-build-system)
43 (home-page "https://github.com/cuviper/autocfg")
44 (synopsis "Automatic cfg for Rust compiler features")
45 (description "Rust library for build scripts to automatically configure
46 code based on compiler support. Code snippets are dynamically tested to see
47 if the @code{rustc} will accept them, rather than hard-coding specific version
48 support.")
49 (license (list license:asl2.0
50 license:expat))))
51
52 (define-public rust-bencher
53 (package
54 (name "rust-bencher")
55 (version "0.1.5")
56 (source
57 (origin
58 (method url-fetch)
59 (uri (crate-uri "bencher" version))
60 (file-name (string-append name "-" version ".tar.gz"))
61 (sha256
62 (base32
63 "1x8p2xblgqssay8cdykp5pkfc0np0jk5bs5cx4f5av097aav9zbx"))))
64 (build-system cargo-build-system)
65 (home-page "https://github.com/bluss/bencher/")
66 (synopsis "Port of the libtest benchmark runner to Rust stable")
67 (description "This package provides a port of the libtest (unstable Rust)
68 benchmark runner to Rust stable releases. Supports running benchmarks and
69 filtering based on the name. Benchmark execution works exactly the same way
70 and no more (caveat: black_box is still missing!).")
71 (license (list license:asl2.0
72 license:expat))))
73
74 (define-public rust-bitflags
75 (package
76 (name "rust-bitflags")
77 (version "1.1.0")
78 (source
79 (origin
80 (method url-fetch)
81 (uri (crate-uri "bitflags" version))
82 (file-name (string-append name "-" version ".tar.gz"))
83 (sha256
84 (base32
85 "1zc1qb1hwsnl2d8rhzicsv9kqd5b2hwbrscrcfw5as4sfr35659x"))))
86 (build-system cargo-build-system)
87 (home-page "https://github.com/bitflags/bitflags")
88 (synopsis "Macro to generate structures which behave like bitflags")
89 (description "This package provides a macro to generate structures which
90 behave like a set of bitflags.")
91 (license (list license:asl2.0
92 license:expat))))
93
94 (define-public rust-cfg-if
95 (package
96 (name "rust-cfg-if")
97 (version "0.1.9")
98 (source
99 (origin
100 (method url-fetch)
101 (uri (crate-uri "cfg-if" version))
102 (file-name (string-append name "-" version ".tar.gz"))
103 (sha256
104 (base32
105 "0csygklgz3ybpr0670rkip49zh76m43ar3k7xgypkzbzrwycx1ml"))))
106 (build-system cargo-build-system)
107 (home-page "https://github.com/alexcrichton/cfg-if")
108 (synopsis "Define an item depending on parameters")
109 (description "This package provides a macro to ergonomically define an item
110 depending on a large number of #[cfg] parameters. Structured like an
111 @code{if-else} chain, the first matching branch is the item that gets emitted.")
112 (license (list license:asl2.0
113 license:expat))))
114
115 (define-public rust-discard
116 (package
117 (name "rust-discard")
118 (version "1.0.4")
119 (source
120 (origin
121 (method url-fetch)
122 (uri (crate-uri "discard" version))
123 (file-name (string-append name "-" version ".tar.gz"))
124 (sha256
125 (base32
126 "1h67ni5bxvg95s91wgicily4ix7lcw7cq0a5gy9njrybaibhyb91"))))
127 (build-system cargo-build-system)
128 (home-page "https://github.com/Pauan/rust-discard")
129 (synopsis "Allow for intentionally leaking memory")
130 (description "There are situations where you need to intentionally leak some
131 memory but not other memory. This package provides a discard trait which allows
132 for intentionally leaking memory")
133 (license license:expat)))
134
135 (define-public rust-doc-comment
136 (package
137 (name "rust-doc-comment")
138 (version "0.3.1")
139 (source
140 (origin
141 (method url-fetch)
142 (uri (crate-uri "doc-comment" version))
143 (file-name (string-append name "-" version ".tar.gz"))
144 (sha256
145 (base32
146 "15rsqxgarfpb1yim9sbp9yfgj7p2dq6v51c6bq1a62paii9ylgcj"))))
147 (build-system cargo-build-system)
148 (home-page "https://github.com/GuillaumeGomez/doc-comment")
149 (synopsis "Macro to generate doc comments")
150 (description "This package provides a way to generate doc comments
151 from macros.")
152 (license license:expat)))
153
154 (define-public rust-dtoa
155 (package
156 (name "rust-dtoa")
157 (version "0.4.4")
158 (source
159 (origin
160 (method url-fetch)
161 (uri (crate-uri "dtoa" version))
162 (file-name (string-append name "-" version ".tar.gz"))
163 (sha256
164 (base32
165 "0phbm7i0dpn44gzi07683zxaicjap5064w62pidci4fhhciv8mza"))))
166 (build-system cargo-build-system)
167 (home-page "https://github.com/dtolnay/dtoa")
168 (synopsis "Fast functions for printing floating-point primitives")
169 (description "This crate provides fast functions for printing
170 floating-point primitives to an @code{io::Write}.")
171 (license (list license:asl2.0
172 license:expat))))
173
174 (define-public rust-fallible-iterator
175 (package
176 (name "rust-fallible-iterator")
177 (version "0.2.0")
178 (source
179 (origin
180 (method url-fetch)
181 (uri (crate-uri "fallible-iterator" version))
182 (file-name (string-append name "-" version ".tar.gz"))
183 (sha256
184 (base32
185 "1xq759lsr8gqss7hva42azn3whgrbrs2sd9xpn92c5ickxm1fhs4"))))
186 (build-system cargo-build-system)
187 (home-page "https://github.com/sfackler/rust-fallible-iterator")
188 (synopsis "Fallible iterator traits")
189 (description "If the @code{std} or @code{alloc} features are enabled, this
190 crate provides implementations for @code{Box}, @code{Vec}, @code{BTreeMap}, and
191 @code{BTreeSet}. If the @code{std} feature is enabled, this crate additionally
192 provides implementations for @code{HashMap} and @code{HashSet}.")
193 (license (list license:asl2.0
194 license:expat))))
195
196 (define-public rust-fnv
197 (package
198 (name "rust-fnv")
199 (version "1.0.6")
200 (source
201 (origin
202 (method url-fetch)
203 (uri (crate-uri "fnv" version))
204 (file-name (string-append name "-" version ".tar.gz"))
205 (sha256
206 (base32
207 "1ww56bi1r5b8id3ns9j3qxbi7w5h005rzhiryy0zi9h97raqbb9g"))))
208 (build-system cargo-build-system)
209 (home-page "https://github.com/servo/rust-fnv")
210 (synopsis "implementation of the Fowler-Noll-Vo hash function")
211 (description "The @code{fnv} hash function is a custom @code{Hasher}
212 implementation that is more efficient for smaller hash keys.")
213 (license (list license:asl2.0
214 license:expat))))
215
216 (define-public rust-fs-extra
217 (package
218 (name "rust-fs-extra")
219 (version "1.1.0")
220 (source
221 (origin
222 (method url-fetch)
223 (uri (crate-uri "fs_extra" version))
224 (file-name (string-append name "-" version ".tar.gz"))
225 (sha256
226 (base32
227 "0x6675wdhsx277k1k1235jwcv38naf20d8kwrk948ds26hh4lajz"))))
228 (build-system cargo-build-system)
229 (home-page "https://github.com/webdesus/fs_extra")
230 (synopsis "Extra filesystem methods")
231 (description "Expanding opportunities standard library @code{std::fs} and
232 @code{std::io}. Recursively copy folders with recept information about
233 process and much more.")
234 (license license:expat)))
235
236 (define-public rust-futures
237 (package
238 (name "rust-futures")
239 (version "0.1.28")
240 (source
241 (origin
242 (method url-fetch)
243 (uri (crate-uri "futures" version))
244 (file-name (string-append name "-" version ".tar.gz"))
245 (sha256
246 (base32
247 "0saq8ffjw1pwf1pzhw3kq1z7dfq6wpd8x93dnni6vbkc799kkp25"))))
248 (build-system cargo-build-system)
249 (home-page "https://github.com/rust-lang-nursery/futures-rs")
250 (synopsis "Implementation of zero-cost futures in Rust")
251 (description "An implementation of @code{futures} and @code{streams}
252 featuring zero allocations, composability, and iterator-like interfaces.")
253 (license (list license:asl2.0
254 license:expat))))
255
256 (define-public rust-hex
257 (package
258 (name "rust-hex")
259 (version "0.3.2")
260 (source
261 (origin
262 (method url-fetch)
263 (uri (crate-uri "hex" version))
264 (file-name (string-append name "-" version ".tar.gz"))
265 (sha256
266 (base32
267 "0xsdcjiik5j750j67zk42qdnmm4ahirk3gmkmcqgq7qls2jjcl40"))))
268 (build-system cargo-build-system)
269 (home-page "https://github.com/KokaKiwi/rust-hex")
270 (synopsis "Encode and decode data to/from hexadecimals")
271 (description "This crate allows for encoding and decoding data into/from
272 hexadecimal representation.")
273 (license (list license:asl2.0
274 license:expat))))
275
276 (define-public rust-itoa
277 (package
278 (name "rust-itoa")
279 (version "0.4.4")
280 (source
281 (origin
282 (method url-fetch)
283 (uri (crate-uri "itoa" version))
284 (file-name (string-append name "-" version ".tar.gz"))
285 (sha256
286 (base32
287 "0zvg2d9qv3avhf3d8ggglh6fdyw8kkwqg3r4622ly5yhxnvnc4jh"))))
288 (build-system cargo-build-system)
289 (home-page "https://github.com/dtolnay/itoa")
290 (synopsis "Fast functions for printing integer primitives")
291 (description "This crate provides fast functions for printing integer
292 primitives to an @code{io::Write}.")
293 (license (list license:asl2.0
294 license:expat))))
295
296 (define-public rust-json
297 (package
298 (name "rust-json")
299 (version "0.11.14")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (crate-uri "json" version))
304 (file-name (string-append name "-" version ".tar.gz"))
305 (sha256
306 (base32
307 "1hj8c6xj5c2aqqszi8naaflmcdbya1i9byyjrq4iybxjb4q91mq1"))))
308 (build-system cargo-build-system)
309 (home-page "https://github.com/maciejhirsz/json-rust")
310 (synopsis "JSON implementation in Rust")
311 (description "This crate provides a JSON implementation in Rust, reducing
312 friction with idiomatic Rust structs to ease interopability.")
313 (license (list license:asl2.0
314 license:expat))))
315
316 (define-public rust-maplit
317 (package
318 (name "rust-maplit")
319 (version "1.0.1")
320 (source
321 (origin
322 (method url-fetch)
323 (uri (crate-uri "maplit" version))
324 (file-name (string-append name "-" version ".tar.gz"))
325 (sha256
326 (base32
327 "0hsczmvd6zkqgzqdjp5hfyg7f339n68w83n4pxvnsszrzssbdjq8"))))
328 (build-system cargo-build-system)
329 (home-page "https://github.com/bluss/maplit")
330 (synopsis "Collection of Map macros")
331 (description "This crate provides a collection of @code{literal} macros for
332 @code{HashMap}, @code{HashSet}, @code{BTreeMap}, and @code{BTreeSet.}")
333 (license (list license:asl2.0
334 license:expat))))
335
336 (define-public rust-matches
337 (package
338 (name "rust-matches")
339 (version "0.1.8")
340 (source
341 (origin
342 (method url-fetch)
343 (uri (crate-uri "matches" version))
344 (file-name (string-append name "-" version ".tar.gz"))
345 (sha256
346 (base32
347 "020axl4q7rk9vz90phs7f8jas4imxal9y9kxl4z4v7a6719mrz3z"))))
348 (build-system cargo-build-system)
349 (home-page "https://github.com/SimonSapin/rust-std-candidates")
350 (synopsis "Macro to evaluate whether an expression matches a pattern.")
351 (description "This package provides a macro to evaluate, as a boolean,
352 whether an expression matches a pattern.")
353 (license license:expat)))
354
355 (define-public rust-md5
356 (package
357 (name "rust-md5")
358 (version "0.6.1")
359 (source
360 (origin
361 (method url-fetch)
362 (uri (crate-uri "md5" version))
363 (file-name (string-append name "-" version ".tar.gz"))
364 (sha256
365 (base32
366 "17b2xm4h4cvxsdjsf3kdrzqv2za60kak961xzi5kmw6g6djcssvy"))))
367 (build-system cargo-build-system)
368 (home-page "https://github.com/stainless-steel/md5")
369 (synopsis "MD5 hash function in Rust")
370 (description "The package provides the MD5 hash function.")
371 (license (list license:asl2.0
372 license:expat))))
373
374 (define-public rust-peeking-take-while
375 (package
376 (name "rust-peeking-take-while")
377 (version "0.1.2")
378 (source
379 (origin
380 (method url-fetch)
381 (uri (crate-uri "peeking_take_while" version))
382 (file-name (string-append name "-" version ".tar.gz"))
383 (sha256
384 (base32
385 "16bhqr6rdyrp12zv381cxaaqqd0pwysvm1q8h2ygihvypvfprc8r"))))
386 (build-system cargo-build-system)
387 (home-page "https://github.com/fitzgen/peeking_take_while")
388 (synopsis "Provides the peeking_take_while iterator adaptor method")
389 (description
390 "Like @code{Iterator::take_while}, but calls the predicate on a peeked
391 value. This allows you to use @code{Iterator::by_ref} and
392 @code{Iterator::take_while} together, and still get the first value for which
393 the @code{take_while} predicate returned false after dropping the @code{by_ref}.")
394 (license (list license:asl2.0
395 license:expat))))
396
397 (define-public rust-percent-encoding
398 (package
399 (name "rust-percent-encoding")
400 (version "2.0.0")
401 (source
402 (origin
403 (method url-fetch)
404 (uri (crate-uri "percent-encoding" version))
405 (file-name (string-append name "-" version ".tar.gz"))
406 (sha256
407 (base32
408 "0m6rkp3iy11la04p6z3492rns6n693pvmx585dvfmzzlzak2hkxs"))))
409 (build-system cargo-build-system)
410 (home-page "https://github.com/servo/rust-url/")
411 (synopsis "Percent encoding and decoding")
412 (description "This crate provides percent encoding and decoding.")
413 (license (list license:asl2.0
414 license:expat))))
415
416 (define-public rust-pin-utils
417 (package
418 (name "rust-pin-utils")
419 (version "0.1.0-alpha.4")
420 (source
421 (origin
422 (method url-fetch)
423 (uri (crate-uri "pin-utils" version))
424 (file-name (string-append name "-" version ".tar.gz"))
425 (sha256
426 (base32
427 "11xmyx00n4m37d546by2rxb8ryxs12v55cc172i3yak1rqccd52q"))))
428 (build-system cargo-build-system)
429 (home-page "https://github.com/rust-lang-nursery/pin-utils")
430 (synopsis "Utilities for pinning")
431 (description "This crate provides utilities for pinning values on the stack.")
432 (license (list license:asl2.0
433 license:expat))))
434
435 (define-public rust-proc-macro2
436 (package
437 (name "rust-proc-macro2")
438 (version "0.4.30")
439 (source
440 (origin
441 (method url-fetch)
442 (uri (crate-uri "proc-macro2" version))
443 (file-name
444 (string-append name "-" version ".tar.gz"))
445 (sha256
446 (base32
447 "0nd71fl24sys066jrha6j7i34nfkjv44yzw8yww9742wmc8j0gfg"))))
448 (build-system cargo-build-system)
449 (arguments
450 `(#:cargo-inputs (("rust-unicode-xid" ,rust-unicode-xid))
451 #:cargo-development-inputs (("rust-quote" ,rust-quote))))
452 (home-page "https://github.com/alexcrichton/proc-macro2")
453 (synopsis "Stable implementation of the upcoming new `proc_macro` API")
454 (description "This package provides a stable implementation of the upcoming new
455 `proc_macro` API. Comes with an option, off by default, to also reimplement itself
456 in terms of the upstream unstable API.")
457 ;; Dual licensed.
458 (license (list license:asl2.0 license:expat))))
459
460 (define-public rust-quote
461 (package
462 (name "rust-quote")
463 (version "0.6.12")
464 (source
465 (origin
466 (method url-fetch)
467 (uri (crate-uri "quote" version))
468 (file-name
469 (string-append name "-" version ".tar.gz"))
470 (sha256
471 (base32
472 "1nw0klza45hf127kfyrpxsxd5jw2l6h21qxalil3hkr7bnf7kx7s"))))
473 (build-system cargo-build-system)
474 (arguments
475 `(#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2))))
476 (home-page "https://github.com/dtolnay/quote")
477 (synopsis "Quasi-quoting macro quote!(...)")
478 (description "Quasi-quoting macro quote!(...)")
479 ;; Dual licensed.
480 (license (list license:asl2.0 license:expat))))
481
482 (define-public rust-unicode-xid
483 (package
484 (name "rust-unicode-xid")
485 (version "0.1.0")
486 (source
487 (origin
488 (method url-fetch)
489 (uri (crate-uri "unicode-xid" version))
490 (file-name
491 (string-append name "-" version ".tar.gz"))
492 (sha256
493 (base32
494 "1z57lqh4s18rr4x0j4fw4fmp9hf9346h0kmdgqsqx0fhjr3k0wpw"))))
495 (build-system cargo-build-system)
496 (home-page
497 "https://github.com/unicode-rs/unicode-xid")
498 (synopsis "Determine Unicode XID related properties")
499 (description "Determine whether characters have the XID_Start
500 or XID_Continue properties according to Unicode Standard Annex #31.")
501 ;; Dual licensed.
502 (license (list license:asl2.0 license:expat))))