gnu: ripgrep: Update to 13.0.0.
[jackhill/guix/guix.git] / gnu / packages / rust-apps.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019, 2020 John Soo <jsoo1@asu.edu>
3 ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
5 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
6 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
7 ;;; Copyright © 2020 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
9 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.ccom>
12 ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
13 ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
14 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
15 ;;;
16 ;;; This file is part of GNU Guix.
17 ;;;
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
22 ;;;
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
27 ;;;
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31 (define-module (gnu packages rust-apps)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix build-system cargo)
34 #:use-module (guix download)
35 #:use-module (guix packages)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages crates-io)
38 #:use-module (gnu packages crates-graphics)
39 #:use-module (gnu packages curl)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages fontutils)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages jemalloc)
44 #:use-module (gnu packages ssh)
45 #:use-module (gnu packages pcre)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python-xyz)
48 #:use-module (gnu packages rust)
49 #:use-module (gnu packages tls)
50 #:use-module (gnu packages version-control))
51
52 (define-public agate
53 (package
54 (name "agate")
55 (version "2.5.2")
56 (source
57 (origin
58 (method url-fetch)
59 (uri (crate-uri "agate" version))
60 (file-name (string-append name "-" version ".tar.gz"))
61 (sha256
62 (base32 "1mhrl4j5r6wzsnwpqsbgzny5vqschyjm3gnk4y88har7skk7j19v"))))
63 (build-system cargo-build-system)
64 (arguments
65 `(#:cargo-inputs
66 (("rust-configparser" ,rust-configparser-2)
67 ("rust-env-logger" ,rust-env-logger-0.8)
68 ("rust-getopts" ,rust-getopts-0.2)
69 ("rust-glob" ,rust-glob-0.3)
70 ("rust-log" ,rust-log-0.4)
71 ("rust-mime-guess" ,rust-mime-guess-2)
72 ("rust-once-cell" ,rust-once-cell-1)
73 ("rust-percent-encoding" ,rust-percent-encoding-2)
74 ("rust-rustls" ,rust-rustls-0.19)
75 ("rust-tokio" ,rust-tokio-1)
76 ("rust-tokio-rustls" ,rust-tokio-rustls-0.22)
77 ("rust-url" ,rust-url-2))))
78 (home-page "https://github.com/mbrubeck/agate")
79 (synopsis "Very simple server for the Gemini hypertext protocol")
80 (description
81 "Agate is a server for the Gemini network protocol, built with the Rust
82 programming language. It has very few features, and can only serve static
83 files. It uses async I/O, and should be quite efficient even when running on
84 low-end hardware and serving many concurrent requests.")
85 (license (list license:expat license:asl2.0))))
86
87 (define-public bat
88 (package
89 (name "bat")
90 (version "0.18.1")
91 (source
92 (origin
93 (method url-fetch)
94 (uri (crate-uri "bat" version))
95 (file-name (string-append name "-" version ".tar.gz"))
96 (sha256
97 (base32 "0nvqkddpjxsmd27gqn8czql07faad50mihin5ivb9sxxnni28wnc"))))
98 (build-system cargo-build-system)
99 (arguments
100 `(#:cargo-inputs
101 (("rust-ansi-colours" ,rust-ansi-colours-1)
102 ("rust-ansi-term" ,rust-ansi-term-0.12)
103 ("rust-atty" ,rust-atty-0.2)
104 ("rust-bugreport" ,rust-bugreport-0.4)
105 ("rust-clap" ,rust-clap-2)
106 ("rust-clap" ,rust-clap-2)
107 ("rust-clircle" ,rust-clircle-0.3)
108 ("rust-console" ,rust-console-0.14)
109 ("rust-content-inspector" ,rust-content-inspector-0.2)
110 ("rust-dirs-next" ,rust-dirs-next-2)
111 ("rust-encoding" ,rust-encoding-0.2)
112 ("rust-error-chain" ,rust-error-chain-0.12)
113 ("rust-git2" ,rust-git2-0.13)
114 ("rust-globset" ,rust-globset-0.4)
115 ("rust-lazy-static" ,rust-lazy-static-1)
116 ("rust-path-abs" ,rust-path-abs-0.5)
117 ("rust-semver" ,rust-semver-0.11)
118 ("rust-serde" ,rust-serde-1)
119 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
120 ("rust-shell-words" ,rust-shell-words-1)
121 ("rust-syntect" ,rust-syntect-4)
122 ("rust-unicode-width" ,rust-unicode-width-0.1)
123 ("rust-wild" ,rust-wild-2))
124 #:cargo-development-inputs
125 (("rust-assert-cmd" ,rust-assert-cmd-1)
126 ("rust-nix" ,rust-nix-0.20)
127 ("rust-predicates" ,rust-predicates-1)
128 ("rust-serial-test" ,rust-serial-test-0.5)
129 ("rust-tempfile" ,rust-tempfile-3)
130 ("rust-wait-timeout" ,rust-wait-timeout-0.2))))
131 (native-inputs
132 `(("pkg-config" ,pkg-config)))
133 (inputs
134 `(("libgit2" ,libgit2)
135 ("zlib" ,zlib)))
136 (home-page "https://github.com/sharkdp/bat")
137 (synopsis "@command{cat} clone with syntax highlighting and git integration")
138 (description
139 "@command{bat} is a drop-in @command{cat} replacement featuring syntax
140 highlighting for a large number of languages, git integration, and automatic
141 paging.")
142 (license (list license:expat license:asl2.0))))
143
144 (define-public drill
145 (package
146 (name "drill")
147 (version "0.7.1")
148 (source
149 (origin
150 (method url-fetch)
151 (uri (crate-uri "drill" version))
152 (file-name (string-append name "-" version ".tar.gz"))
153 (sha256
154 (base32 "1m73d7rzi0p5c1hn0081d2235kcyapdza7h0vqf5jhnirpnjn793"))))
155 (build-system cargo-build-system)
156 (arguments
157 `(#:cargo-inputs
158 (("rust-async-trait" ,rust-async-trait-0.1)
159 ("rust-clap" ,rust-clap-2)
160 ("rust-colored" ,rust-colored-1)
161 ("rust-csv" ,rust-csv-1)
162 ("rust-futures" ,rust-futures-0.3)
163 ("rust-lazy-static" ,rust-lazy-static-1)
164 ("rust-linked-hash-map" ,rust-linked-hash-map-0.5)
165 ("rust-num-cpus" ,rust-num-cpus-1)
166 ("rust-rand" ,rust-rand-0.7)
167 ("rust-regex" ,rust-regex-1)
168 ("rust-reqwest" ,rust-reqwest-0.10)
169 ("rust-serde" ,rust-serde-1)
170 ("rust-serde-json" ,rust-serde-json-1)
171 ("rust-tokio" ,rust-tokio-0.2)
172 ("rust-url" ,rust-url-2)
173 ("rust-yaml-rust" ,rust-yaml-rust-0.4))))
174 (native-inputs
175 `(("pkg-config" ,pkg-config)))
176 (inputs
177 `(("openssl" ,openssl)))
178 (home-page "https://github.com/fcsonline/drill")
179 (synopsis "HTTP load testing application")
180 (description
181 "Drill is a HTTP load testing application written in Rust inspired by
182 Ansible syntax. Benchmark files can be written in YAML.")
183 (license license:gpl3)))
184
185 (define-public exa
186 (package
187 (name "exa")
188 (version "0.9.0")
189 (source
190 (origin
191 (method url-fetch)
192 (uri (crate-uri "exa" version))
193 (file-name
194 (string-append name "-" version ".tar.gz"))
195 (sha256
196 (base32
197 "1s902xgplz1167k0r7x235p914lprpsqy2if0kpa1mlb0fswqqq4"))))
198 (build-system cargo-build-system)
199 (arguments
200 `(#:cargo-inputs
201 (("rust-ansi-term" ,rust-ansi-term-0.12)
202 ("rust-datetime" ,rust-datetime-0.4)
203 ("rust-env-logger" ,rust-env-logger-0.6)
204 ("rust-git2" ,rust-git2-0.9)
205 ("rust-glob" ,rust-glob-0.3)
206 ("rust-lazy-static" ,rust-lazy-static-1)
207 ("rust-libc" ,rust-libc-0.2)
208 ("rust-locale" ,rust-locale-0.2)
209 ("rust-log" ,rust-log-0.4)
210 ("rust-natord" ,rust-natord-1)
211 ("rust-num-cpus" ,rust-num-cpus-1)
212 ("rust-number-prefix" ,rust-number-prefix-0.3)
213 ("rust-scoped-threadpool" ,rust-scoped-threadpool-0.1)
214 ("rust-term-grid" ,rust-term-grid-0.1)
215 ("rust-term-size" ,rust-term-size-0.3)
216 ("rust-unicode-width" ,rust-unicode-width-0.1)
217 ("rust-users" ,rust-users-0.9)
218 ("rust-zoneinfo-compiled" ,rust-zoneinfo-compiled-0.4))
219 #:cargo-development-inputs
220 (("rust-datetime" ,rust-datetime-0.4))
221 #:phases
222 (modify-phases %standard-phases
223 ;; Ignoring failing tests.
224 ;; Reported in https://github.com/ogham/exa/issues/318
225 (add-before 'check 'disable-failing-tests
226 (lambda _
227 (substitute* "src/options/mod.rs"
228 (("^.*fn oneline_across.*" oneline-across)
229 (string-append "#[ignore]\n" oneline-across)))
230
231 (substitute* "src/options/view.rs"
232 (("test!\\(across:.*") "")
233 (("test!\\(cr:.*") "")
234 (("test!\\(empty:.*") "")
235 (("test!\\(gracross:.*") "")
236 (("test!\\(grid:.*") "")
237 (("test!\\(icons:.*") "")
238 (("test!\\(just_binary:.*") "")
239 (("test!\\(just_blocks:.*") "")
240 (("test!\\(just_bytes:.*") "")
241 (("test!\\(just_git:.*") "")
242 (("test!\\(just_group:.*") "")
243 (("test!\\(just_header:.*") "")
244 (("test!\\(just_inode:.*") "")
245 (("test!\\(just_links:.*") "")
246 (("test!\\(leg:.*") "")
247 (("test!\\(lid:.*") "")
248 (("test!\\(original_g:.*") ""))
249 #t))
250 (add-after 'install 'install-extras
251 (lambda* (#:key outputs #:allow-other-keys)
252 (let* ((out (assoc-ref outputs "out"))
253 (share (string-append out "/share"))
254 (man1 (string-append share "/man/man1")))
255 (install-file "contrib/man/exa.1" man1)
256 (mkdir-p (string-append out "/etc/bash_completion.d"))
257 (mkdir-p (string-append share "/fish/vendor_completions.d"))
258 (mkdir-p (string-append share "/zsh/site-functions"))
259 (copy-file "contrib/completions.bash"
260 (string-append out "/etc/bash_completion.d/exa"))
261 (copy-file "contrib/completions.fish"
262 (string-append share "/fish/vendor_completions.d/exa.fish"))
263 (copy-file "contrib/completions.zsh"
264 (string-append share "/zsh/site-functions/_exa"))
265 #t))))))
266 (inputs
267 `(("libgit2" ,libgit2)
268 ("zlib" ,zlib)))
269 (native-inputs
270 `(("pkg-config" ,pkg-config)))
271 (home-page "https://the.exa.website/")
272 (synopsis "Modern replacement for ls")
273 (description "@code{exa} is a modern replacement for the command-line
274 program @code{ls}. It uses colours to distinguish file types and metadata. It
275 also knows about symlinks, extended attributes, and Git.")
276 (license license:expat)))
277
278 (define-public fd
279 (package
280 (name "fd")
281 (version "8.1.1")
282 (source
283 (origin
284 (method url-fetch)
285 (uri (crate-uri "fd-find" version))
286 (file-name
287 (string-append name "-" version ".tar.gz"))
288 (sha256
289 (base32
290 "124a5r8hpk2phs1288jybh34d48yxy44wr7gv5ggchs272gs2jam"))))
291 (build-system cargo-build-system)
292 (arguments
293 `(#:cargo-inputs
294 (("rust-ansi-term" ,rust-ansi-term-0.12)
295 ("rust-anyhow" ,rust-anyhow-1)
296 ("rust-atty" ,rust-atty-0.2)
297 ("rust-clap" ,rust-clap-2)
298 ("rust-ctrlc" ,rust-ctrlc-3)
299 ("rust-dirs" ,rust-dirs-2)
300 ("rust-globset" ,rust-globset-0.4)
301 ("rust-humantime" ,rust-humantime-2)
302 ("rust-ignore" ,rust-ignore-0.4)
303 ("rust-jemallocator" ,rust-jemallocator-0.3)
304 ("rust-lazy-static" ,rust-lazy-static-1)
305 ("rust-libc" ,rust-libc-0.2)
306 ("rust-lscolors" ,rust-lscolors-0.7)
307 ("rust-num-cpus" ,rust-num-cpus-1)
308 ("rust-regex" ,rust-regex-1)
309 ("rust-regex-syntax" ,rust-regex-syntax-0.6)
310 ("rust-users" ,rust-users-0.10)
311 ("rust-version-check" ,rust-version-check-0.9))
312 #:cargo-development-inputs
313 (("rust-diff" ,rust-diff-0.1)
314 ("rust-filetime" ,rust-filetime-0.2)
315 ("rust-tempdir" ,rust-tempdir-0.3))
316 #:phases
317 (modify-phases %standard-phases
318 (add-after 'unpack 'override-jemalloc
319 (lambda* (#:key inputs #:allow-other-keys)
320 (let ((jemalloc (assoc-ref inputs "jemalloc")))
321 (setenv "JEMALLOC_OVERRIDE"
322 (string-append jemalloc "/lib/libjemalloc.so")))
323 #t))
324 (add-after 'install 'install-extra
325 (lambda* (#:key outputs #:allow-other-keys)
326 (let* ((out (assoc-ref outputs "out"))
327 (install-completion
328 (lambda (completion out-dir)
329 (for-each
330 (lambda (f)
331 (install-file f (string-append out out-dir)))
332 (find-files "target/release/build/" completion)))))
333 ;; Manpages
334 (install-file "doc/fd.1" (string-append out "/share/man/man1"))
335 ;; Completions
336 (install-completion "^fd.bash$" "/etc/bash_completion.d")
337 (install-completion "^fd.fish$" "/share/fish/vendor_completions.d")
338 (install-completion "^_fd$" "/share/zsh/site-functions")
339 (rename-file (string-append out "/etc/bash_completion.d/fd.bash")
340 (string-append out "/etc/bash_completion.d/fd"))
341 #t))))))
342 (inputs `(("jemalloc" ,jemalloc)))
343 (home-page "https://github.com/sharkdp/fd")
344 (synopsis "Simple, fast and user-friendly alternative to find")
345 (description
346 "@code{fd} is a simple, fast and user-friendly alternative to @code{find}.
347 While it does not seek to mirror all of find's powerful functionality, it
348 provides defaults for 80% of the use cases.")
349 (license (list license:expat license:asl2.0))))
350
351 (define-public hexyl
352 (package
353 (name "hexyl")
354 (version "0.8.0")
355 (source
356 (origin
357 (method url-fetch)
358 (uri (crate-uri "hexyl" version))
359 (file-name
360 (string-append name "-" version ".tar.gz"))
361 (sha256
362 (base32
363 "0sipag77196467idbznbk5q5lwhqz85zw7y1pwg9b27jxqyk04rp"))))
364 (build-system cargo-build-system)
365 (arguments
366 `(#:cargo-inputs
367 (("rust-ansi-term" ,rust-ansi-term-0.12)
368 ("rust-atty" ,rust-atty-0.2)
369 ("rust-clap" ,rust-clap-2)
370 ("rust-libc" ,rust-libc-0.2))))
371 (home-page "https://github.com/sharkdp/hexyl")
372 (synopsis "Command-line hex viewer")
373 (description
374 "This package provides a command line hex viewer. It uses a colored output
375 for distinguishing different kinds of bytes such as NULL bytes, printable ASCII
376 characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
377 (license (list license:expat license:asl2.0))))
378
379 (define-public ripgrep
380 (package
381 (name "ripgrep")
382 (version "13.0.0")
383 (source
384 (origin
385 (method url-fetch)
386 (uri (crate-uri "ripgrep" version))
387 (file-name
388 (string-append name "-" version ".tar.gz"))
389 (sha256
390 (base32
391 "1gv4imhjgxmyxaa996yshcjlakmrjw9pf4rycp90pq675cn9sz7k"))))
392 (build-system cargo-build-system)
393 (arguments
394 ;; XXX: Upgrading rust-bstr-0.2 from 0.2.12 to 0.2.15 introduced 11 test
395 ;; failures. Skip tests for now. Check again at next bstr or ripgrep
396 ;; upgrade.
397 `(#:tests? #t
398 #:cargo-inputs
399 (("rust-bstr" ,rust-bstr-0.2)
400 ("rust-clap" ,rust-clap-2)
401 ("rust-grep" ,rust-grep-0.2)
402 ("rust-ignore" ,rust-ignore-0.4)
403 ("rust-jemallocator" ,rust-jemallocator-0.3)
404 ("rust-lazy-static" ,rust-lazy-static-1)
405 ("rust-log" ,rust-log-0.4)
406 ("rust-num-cpus" ,rust-num-cpus-1)
407 ("rust-regex" ,rust-regex-1)
408 ("rust-serde-json" ,rust-serde-json-1)
409 ("rust-termcolor" ,rust-termcolor-1))
410 #:cargo-development-inputs
411 (("rust-serde" ,rust-serde-1)
412 ("rust-serde-derive" ,rust-serde-derive-1)
413 ("rust-walkdir" ,rust-walkdir-2))
414 #:modules ((ice-9 match)
415 (guix build cargo-build-system)
416 (guix build utils))
417 #:phases
418 (modify-phases %standard-phases
419 (add-after 'build 'install-manpage
420 ;; NOTE: This is done before 'check so that there's only one output
421 ;; directory with the man page.
422 (lambda* (#:key outputs #:allow-other-keys)
423 (match (find-files "target" "^rg\\.1$")
424 ((manpage)
425 (install-file manpage (string-append
426 (assoc-ref outputs "out")
427 "/share/man/man1"))))
428 #t)))
429 #:features '("pcre2")))
430 (native-inputs
431 `(("asciidoc" ,asciidoc)
432 ("pcre2" ,pcre2)
433 ("pkg-config" ,pkg-config)))
434 (home-page "https://github.com/BurntSushi/ripgrep")
435 (synopsis "Line-oriented search tool")
436 (description
437 "ripgrep is a line-oriented search tool that recursively searches
438 your current directory for a regex pattern while respecting your
439 gitignore rules.")
440 (license (list license:unlicense license:expat))))
441
442 (define-public rust-cbindgen
443 (package
444 (name "rust-cbindgen")
445 (version "0.13.2")
446 (source
447 (origin
448 (method url-fetch)
449 (uri (crate-uri "cbindgen" version))
450 (file-name (string-append name "-" version ".crate"))
451 (sha256
452 (base32
453 "0673pq96hs7waavkv58v2pakpxpsfyjvbraa5kyl2b44phgdzcid"))))
454 (build-system cargo-build-system)
455 (arguments
456 `(#:cargo-inputs
457 (("clap" ,rust-clap-2)
458 ("log" ,rust-log-0.4)
459 ("proc-macro2" ,rust-proc-macro2-1)
460 ("quote" ,rust-quote-1)
461 ("serde" ,rust-serde-1)
462 ("serde-json" ,rust-serde-json-1)
463 ("syn" ,rust-syn-1)
464 ("tempfile" ,rust-tempfile-3)
465 ("toml" ,rust-toml-0.5))))
466 (home-page "https://github.com/eqrion/cbindgen/")
467 (synopsis "Tool for generating C bindings to Rust code")
468 (description
469 "This package provides a tool for generating C/C++ bindings to Rust code.")
470 (license license:mpl2.0)))
471
472 (define-public rust-cbindgen-0.19
473 (package
474 (inherit rust-cbindgen)
475 (name "rust-cbindgen")
476 (version "0.19.0")
477 (source
478 (origin
479 (method url-fetch)
480 (uri (crate-uri "cbindgen" version))
481 (file-name
482 (string-append name "-" version ".tar.gz"))
483 (sha256
484 (base32
485 "1yld9fni9g9mzg4r42zfk79aq9mzm2sfzzjrrx4vir4lp4qqqwiq"))))
486 (arguments
487 `(#:cargo-inputs
488 (("rust-clap" ,rust-clap-2)
489 ("rust-heck" ,rust-heck-0.3)
490 ("rust-indexmap" ,rust-indexmap-1)
491 ("rust-log" ,rust-log-0.4)
492 ("rust-proc-macro2" ,rust-proc-macro2-1)
493 ("rust-quote" ,rust-quote-1)
494 ("rust-serde" ,rust-serde-1)
495 ("rust-serde-json" ,rust-serde-json-1)
496 ("rust-syn" ,rust-syn-1)
497 ("rust-tempfile" ,rust-tempfile-3)
498 ("rust-toml" ,rust-toml-0.5))
499 #:cargo-development-inputs
500 (("rust-serial-test" ,rust-serial-test-0.5))))
501 (native-inputs
502 `(("python-cython" ,python-cython)))))
503
504 (define-public rust-cbindgen-0.16
505 (package
506 (inherit rust-cbindgen)
507 (name "rust-cbindgen")
508 (version "0.16.0")
509 (source
510 (origin
511 (method url-fetch)
512 (uri (crate-uri "cbindgen" version))
513 (file-name (string-append name "-" version ".tar.gz"))
514 (sha256
515 (base32 "049cai626nzw0km03parx4sxwaxgbr7i5ifjbjwnfxkqkj5k2i4k"))))
516 (arguments
517 `(#:tests? #false ;missing files
518 #:cargo-inputs
519 (("rust-clap" ,rust-clap-2)
520 ("rust-heck" ,rust-heck-0.3)
521 ("rust-indexmap" ,rust-indexmap-1)
522 ("rust-log" ,rust-log-0.4)
523 ("rust-proc-macro2" ,rust-proc-macro2-1)
524 ("rust-quote" ,rust-quote-1)
525 ("rust-serde" ,rust-serde-1)
526 ("rust-serde-json" ,rust-serde-json-1)
527 ("rust-syn" ,rust-syn-1)
528 ("rust-tempfile" ,rust-tempfile-3)
529 ("rust-toml" ,rust-toml-0.5))
530 #:cargo-development-inputs
531 (("rust-serial-test" ,rust-serial-test-0.5))))))
532
533 (define-public rust-cbindgen-0.15
534 (package
535 (inherit rust-cbindgen)
536 (name "rust-cbindgen")
537 (version "0.15.0")
538 (source
539 (origin
540 (method url-fetch)
541 (uri (crate-uri "cbindgen" version))
542 (file-name (string-append name "-" version ".tar.gz"))
543 (sha256
544 (base32 "0dgf49zij9rxnf0lv4k5gcmx1mxcz16czkk6q63anz0xp8ds3xhx"))))
545 (arguments
546 `(#:tests? #false ;missing files
547 #:cargo-inputs
548 (("rust-clap" ,rust-clap-2)
549 ("rust-heck" ,rust-heck-0.3)
550 ("rust-indexmap" ,rust-indexmap-1)
551 ("rust-log" ,rust-log-0.4)
552 ("rust-proc-macro2" ,rust-proc-macro2-1)
553 ("rust-quote" ,rust-quote-1)
554 ("rust-serde" ,rust-serde-1)
555 ("rust-serde-json" ,rust-serde-json-1)
556 ("rust-syn" ,rust-syn-1)
557 ("rust-tempfile" ,rust-tempfile-3)
558 ("rust-toml" ,rust-toml-0.5))))))
559
560 (define-public rust-cbindgen-0.14
561 (package
562 (inherit rust-cbindgen)
563 (name "rust-cbindgen")
564 (version "0.14.1")
565 (source
566 (origin
567 (method url-fetch)
568 (uri (crate-uri "cbindgen" version))
569 (file-name
570 (string-append name "-" version ".tar.gz"))
571 (sha256
572 (base32
573 "1ppwqbzydxlg9a24lynzfk60xrvqw4k31mpz1wrk6lbf88zf8nxi"))))))
574
575 (define-public rust-cbindgen-0.12
576 (package
577 (inherit rust-cbindgen)
578 (name "rust-cbindgen")
579 (version "0.12.2")
580 (source
581 (origin
582 (method url-fetch)
583 (uri (crate-uri "cbindgen" version))
584 (file-name
585 (string-append name "-" version ".tar.gz"))
586 (sha256
587 (base32
588 "13jzbmjz1bmmfr0i80hw6ar484mgabx3hbpb2ynhk0ddqi0yr58m"))))))
589
590 (define-public tectonic
591 (package
592 (name "tectonic")
593 (version "0.5.2")
594 (source
595 (origin
596 (method url-fetch)
597 (uri (crate-uri "tectonic" version))
598 (file-name (string-append name "-" version ".tar.gz"))
599 (sha256
600 (base32 "050d5slf3s6p58nzkqdqqx2bpwnjkyfk3y5bwfkrdiimfdi6k6yd"))))
601 (build-system cargo-build-system)
602 (arguments
603 `(#:rust ,rust-1.52
604 #:cargo-inputs
605 (("rust-app-dirs2" ,rust-app-dirs2-2)
606 ("rust-atty" ,rust-atty-0.2)
607 ("rust-byte-unit" ,rust-byte-unit-4)
608 ("rust-cfg-if" ,rust-cfg-if-1)
609 ("rust-error-chain" ,rust-error-chain-0.12)
610 ("rust-flate2" ,rust-flate2-1)
611 ("rust-fs2" ,rust-fs2-0.4)
612 ("rust-lazy-static" ,rust-lazy-static-1)
613 ("rust-libc" ,rust-libc-0.2)
614 ("rust-md-5" ,rust-md-5-0.9)
615 ("rust-open" ,rust-open-1)
616 ("rust-serde" ,rust-serde-1)
617 ("rust-sha2" ,rust-sha2-0.9)
618 ("rust-structopt" ,rust-structopt-0.3)
619 ("rust-tectonic-bridge-core" ,rust-tectonic-bridge-core-0.1)
620 ("rust-tectonic-engine-bibtex" ,rust-tectonic-engine-bibtex-0.1)
621 ("rust-tectonic-engine-xdvipdfmx" ,rust-tectonic-engine-xdvipdfmx-0.1)
622 ("rust-tectonic-engine-xetex" ,rust-tectonic-engine-xetex-0.1)
623 ("rust-tectonic-errors" ,rust-tectonic-errors-0.2)
624 ("rust-tectonic-geturl" ,rust-tectonic-geturl-0.2)
625 ("rust-tectonic-io-base" ,rust-tectonic-io-base-0.2)
626 ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.1)
627 ("rust-tectonic-xdv" ,rust-tectonic-xdv-0.1)
628 ("rust-tectonic-xetex-layout" ,rust-tectonic-xetex-layout-0.1)
629 ("rust-tempfile" ,rust-tempfile-3)
630 ("rust-termcolor" ,rust-termcolor-1)
631 ("rust-toml" ,rust-toml-0.5)
632 ("rust-url" ,rust-url-2)
633 ("rust-watchexec" ,rust-watchexec-1)
634 ("rust-zip" ,rust-zip-0.5))
635 #:cargo-development-inputs
636 (("rust-filetime" ,rust-filetime-0.2)
637 ("rust-futures" ,rust-futures-0.1)
638 ("rust-headers" ,rust-headers-0.2)
639 ("rust-hyper" ,rust-hyper-0.12)
640 ("rust-tempfile" ,rust-tempfile-3)
641 ("rust-tokio" ,rust-tokio-0.1))
642 #:phases
643 (modify-phases %standard-phases
644 (add-after 'install 'install-doc
645 (lambda* (#:key outputs #:allow-other-keys)
646 (let* ((out (assoc-ref outputs "out"))
647 (doc (string-append out "/share/doc/" ,name "-" ,version)))
648 (copy-recursively "docs/src" doc)))))))
649 (native-inputs
650 `(("pkg-config" ,pkg-config)))
651 (inputs
652 `(("fontconfig" ,fontconfig)
653 ("harfbuzz" ,harfbuzz)
654 ("openssl" ,openssl)
655 ("zlib" ,zlib)))
656 (home-page "https://tectonic-typesetting.github.io/")
657 (synopsis "Complete, embeddable TeX/LaTeX engine")
658 (description
659 "This package provides a modernized, complete, embeddable
660 TeX/LaTeX engine. Tectonic is forked from the XeTeX extension to the
661 classic Web2C implementation of TeX and uses the TeXLive distribution
662 of support files.")
663 (license license:expat)))
664
665 (define-public tokei
666 (package
667 (name "tokei")
668 (version "12.1.2")
669 (source
670 (origin
671 (method url-fetch)
672 (uri (crate-uri "tokei" version))
673 (file-name (string-append name "-" version ".tar.gz"))
674 (sha256
675 (base32 "000w549v1bpw7r57xw656p40ywf1gimvxxx5cjnri2js0xg927x4"))))
676 (build-system cargo-build-system)
677 (arguments
678 `(#:cargo-inputs
679 (("rust-aho-corasick" ,rust-aho-corasick-0.7)
680 ("rust-clap" ,rust-clap-2)
681 ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
682 ("rust-dashmap" ,rust-dashmap-4)
683 ("rust-dirs" ,rust-dirs-3)
684 ("rust-encoding-rs-io" ,rust-encoding-rs-io-0.1)
685 ("rust-env-logger" ,rust-env-logger-0.8)
686 ("rust-grep-searcher" ,rust-grep-searcher-0.1)
687 ("rust-hex" ,rust-hex-0.4)
688 ("rust-ignore" ,rust-ignore-0.4)
689 ("rust-log" ,rust-log-0.4)
690 ("rust-num-format" ,rust-num-format-0.4)
691 ("rust-once-cell" ,rust-once-cell-1)
692 ("rust-parking-lot" ,rust-parking-lot-0.11)
693 ("rust-rayon" ,rust-rayon-1)
694 ("rust-regex" ,rust-regex-1)
695 ("rust-serde" ,rust-serde-1)
696 ("rust-serde-cbor" ,rust-serde-cbor-0.11)
697 ("rust-serde-json" ,rust-serde-json-1)
698 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
699 ("rust-tera" ,rust-tera-1)
700 ("rust-term-size" ,rust-term-size-0.3)
701 ("rust-toml" ,rust-toml-0.5))
702 #:cargo-development-inputs
703 (("rust-git2" ,rust-git2-0.13)
704 ("rust-regex" ,rust-regex-1)
705 ("rust-tempfile" ,rust-tempfile-3))))
706 (native-inputs
707 `(("pkg-config" ,pkg-config)))
708 (inputs
709 `(("libgit2" ,libgit2)
710 ("openssl" ,openssl)
711 ("zlib" ,zlib)))
712 (home-page "https://tokei.rs")
713 (synopsis "Count code, quickly")
714 (description
715 "Tokei is a program that displays statistics about your code. Tokei will
716 show number of files, total lines within those files and code, comments, and
717 blanks grouped by language.")
718 (license (list license:expat license:asl2.0))))
719
720 (define-public watchexec
721 (package
722 (name "watchexec")
723 (version "1.16.1")
724 (source
725 (origin
726 (method url-fetch)
727 (uri (crate-uri "watchexec-cli" version))
728 (file-name (string-append name "-" version ".tar.gz"))
729 (sha256
730 (base32 "1wp424gzw1zmax5yy5gya15knl24rjx8gi9c7palvq807q3cnj65"))))
731 (build-system cargo-build-system)
732 (arguments
733 `(#:phases
734 (modify-phases %standard-phases
735 (add-after 'install 'install-completions
736 (lambda* (#:key outputs #:allow-other-keys)
737 (let* ((out (assoc-ref outputs "out"))
738 (zsh (string-append out "/share/zsh/site-functions/_watchexec"))
739 (doc (string-append out "/share/doc/watchexec-" ,version)))
740 (mkdir-p (dirname zsh))
741 ;; FIXME: The crates.io source does not provide zsh
742 ;; completions. But the GitHub source does not compile.
743 ;;
744 ;; (copy-file "completions/zsh" zsh)
745 (install-file "README.md" doc)))))
746 #:cargo-inputs
747 (("rust-clap" ,rust-clap-2)
748 ("rust-embed-resource" ,rust-embed-resource-1)
749 ("rust-env-logger" ,rust-env-logger-0.8)
750 ("rust-log" ,rust-log-0.4)
751 ("rust-watchexec" ,rust-watchexec-1))
752 #:cargo-development-inputs
753 (("rust-assert-cmd" ,rust-assert-cmd-1)
754 ("rust-insta" ,rust-insta-1))))
755 (home-page "https://github.com/watchexec/watchexec")
756 (synopsis "Executes commands in response to file modifications")
757 (description
758 "@command{watchexec} is a simple, standalone tool that watches a path and
759 runs a command whenever it detects modifications.")
760 (license license:asl2.0)))
761
762 (define-public rust-cargo-c
763 (package
764 (name "rust-cargo-c")
765 (version "0.8.1+cargo-0.53")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (crate-uri "cargo-c" version))
770 (file-name
771 (string-append name "-" version ".tar.gz"))
772 (sha256
773 (base32
774 "0fwdxhdj2963xr6xfqr56i7hikhsdv562vgxq2dj3h2mi3dil1k6"))))
775 (build-system cargo-build-system)
776 (arguments
777 `(#:rust ,rust-1.52 ;inherited from rust-cargo
778 #:cargo-inputs
779 (("rust-cbindgen" ,rust-cbindgen-0.19)
780 ("rust-cargo" ,rust-cargo-0.53) ;
781 ("rust-anyhow" ,rust-anyhow-1)
782 ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.4)
783 ("rust-structopt" ,rust-structopt-0.3)
784 ("rust-log" ,rust-log-0.4)
785 ("rust-toml" ,rust-toml-0.5)
786 ("rust-cargo-metadata" ,rust-cargo-metadata-0.9)
787 ("rust-semver" ,rust-semver-0.10)
788 ("rust-serde" ,rust-serde-1)
789 ("rust-serde-derive" ,rust-serde-derive-1)
790 ("rust-serde-json" ,rust-serde-json-1)
791 ("rust-regex" ,rust-regex-1))))
792 (native-inputs
793 `(("pkg-config" ,pkg-config)))
794 (inputs
795 `(("curl" ,curl)
796 ("libssh2" ,libssh2)
797 ("openssl" ,openssl)
798 ("zlib" ,zlib)))
799 (home-page "https://github.com/lu-zero/cargo-c")
800 (synopsis "Build and install C-compatible libraries")
801 (description
802 "This package produces and installs a correct pkg-config file, a static
803 library and a dynamic library, and a C header to be used by any C (and
804 C-compatible) software.")
805 (license license:expat)))
806
807 (define-public zoxide
808 (package
809 (name "zoxide")
810 (version "0.6.0")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (crate-uri "zoxide" version))
815 (file-name (string-append name "-" version ".tar.gz"))
816 (sha256
817 (base32 "1ih01l3xp8plicxhmyxjkq12ncpdb8954jcj3dh3lwvkhvw29nkk"))))
818 (build-system cargo-build-system)
819 (arguments
820 `(#:cargo-inputs
821 (("rust-anyhow" ,rust-anyhow-1)
822 ("rust-askama" ,rust-askama-0.10)
823 ("rust-bincode" ,rust-bincode-1)
824 ("rust-clap" ,rust-clap-3)
825 ("rust-dirs-next" ,rust-dirs-next-2)
826 ("rust-dunce" ,rust-dunce-1)
827 ("rust-glob" ,rust-glob-0.3)
828 ("rust-once-cell" ,rust-once-cell-1)
829 ("rust-ordered-float" ,rust-ordered-float-2)
830 ("rust-rand" ,rust-rand-0.7)
831 ("rust-serde" ,rust-serde-1)
832 ("rust-tempfile" ,rust-tempfile-3))
833 #:cargo-development-inputs
834 (("rust-assert-cmd" ,rust-assert-cmd-1)
835 ("rust-seq-macro" ,rust-seq-macro-0.2))))
836 (home-page "https://github.com/ajeetdsouza/zoxide/")
837 (synopsis "Fast way to navigate your file system")
838 (description
839 "Zoxide is a fast replacement for your @command{cd} command. It keeps
840 track of the directories you use most frequently, and uses a ranking algorithm
841 to navigate to the best match.")
842 (license license:expat)))