gnu: tectonic: Update to 0.5.2.
[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 "12.1.1")
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 "1grfi0j9zczzipipc21lkdbqmd2lvy2wlqy65fy4sckqvix5amdr"))))
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? #false
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 #:modules ((ice-9 match)
414 (guix build cargo-build-system)
415 (guix build utils))
416 #:phases
417 (modify-phases %standard-phases
418 (add-after 'build 'install-manpage
419 ;; NOTE: This is done before 'check so that there's only one output
420 ;; directory with the man page.
421 (lambda* (#:key outputs #:allow-other-keys)
422 (match (find-files "target" "^rg\\.1$")
423 ((manpage)
424 (install-file manpage (string-append
425 (assoc-ref outputs "out")
426 "/share/man/man1"))))
427 #t)))
428 #:features '("pcre2")))
429 (native-inputs
430 `(("asciidoc" ,asciidoc)
431 ("pcre2" ,pcre2)
432 ("pkg-config" ,pkg-config)))
433 (home-page "https://github.com/BurntSushi/ripgrep")
434 (synopsis "Line-oriented search tool")
435 (description
436 "ripgrep is a line-oriented search tool that recursively searches
437 your current directory for a regex pattern while respecting your
438 gitignore rules.")
439 (license (list license:unlicense license:expat))))
440
441 (define-public rust-cbindgen
442 (package
443 (name "rust-cbindgen")
444 (version "0.13.2")
445 (source
446 (origin
447 (method url-fetch)
448 (uri (crate-uri "cbindgen" version))
449 (file-name (string-append name "-" version ".crate"))
450 (sha256
451 (base32
452 "0673pq96hs7waavkv58v2pakpxpsfyjvbraa5kyl2b44phgdzcid"))))
453 (build-system cargo-build-system)
454 (arguments
455 `(#:cargo-inputs
456 (("clap" ,rust-clap-2)
457 ("log" ,rust-log-0.4)
458 ("proc-macro2" ,rust-proc-macro2-1)
459 ("quote" ,rust-quote-1)
460 ("serde" ,rust-serde-1)
461 ("serde-json" ,rust-serde-json-1)
462 ("syn" ,rust-syn-1)
463 ("tempfile" ,rust-tempfile-3)
464 ("toml" ,rust-toml-0.5))))
465 (home-page "https://github.com/eqrion/cbindgen/")
466 (synopsis "Tool for generating C bindings to Rust code")
467 (description
468 "This package provides a tool for generating C/C++ bindings to Rust code.")
469 (license license:mpl2.0)))
470
471 (define-public rust-cbindgen-0.19
472 (package
473 (inherit rust-cbindgen)
474 (name "rust-cbindgen")
475 (version "0.19.0")
476 (source
477 (origin
478 (method url-fetch)
479 (uri (crate-uri "cbindgen" version))
480 (file-name
481 (string-append name "-" version ".tar.gz"))
482 (sha256
483 (base32
484 "1yld9fni9g9mzg4r42zfk79aq9mzm2sfzzjrrx4vir4lp4qqqwiq"))))
485 (arguments
486 `(#:cargo-inputs
487 (("rust-clap" ,rust-clap-2)
488 ("rust-heck" ,rust-heck-0.3)
489 ("rust-indexmap" ,rust-indexmap-1)
490 ("rust-log" ,rust-log-0.4)
491 ("rust-proc-macro2" ,rust-proc-macro2-1)
492 ("rust-quote" ,rust-quote-1)
493 ("rust-serde" ,rust-serde-1)
494 ("rust-serde-json" ,rust-serde-json-1)
495 ("rust-syn" ,rust-syn-1)
496 ("rust-tempfile" ,rust-tempfile-3)
497 ("rust-toml" ,rust-toml-0.5))
498 #:cargo-development-inputs
499 (("rust-serial-test" ,rust-serial-test-0.5))))
500 (native-inputs
501 `(("python-cython" ,python-cython)))))
502
503 (define-public rust-cbindgen-0.16
504 (package
505 (inherit rust-cbindgen)
506 (name "rust-cbindgen")
507 (version "0.16.0")
508 (source
509 (origin
510 (method url-fetch)
511 (uri (crate-uri "cbindgen" version))
512 (file-name (string-append name "-" version ".tar.gz"))
513 (sha256
514 (base32 "049cai626nzw0km03parx4sxwaxgbr7i5ifjbjwnfxkqkj5k2i4k"))))
515 (arguments
516 `(#:tests? #false ;missing files
517 #:cargo-inputs
518 (("rust-clap" ,rust-clap-2)
519 ("rust-heck" ,rust-heck-0.3)
520 ("rust-indexmap" ,rust-indexmap-1)
521 ("rust-log" ,rust-log-0.4)
522 ("rust-proc-macro2" ,rust-proc-macro2-1)
523 ("rust-quote" ,rust-quote-1)
524 ("rust-serde" ,rust-serde-1)
525 ("rust-serde-json" ,rust-serde-json-1)
526 ("rust-syn" ,rust-syn-1)
527 ("rust-tempfile" ,rust-tempfile-3)
528 ("rust-toml" ,rust-toml-0.5))
529 #:cargo-development-inputs
530 (("rust-serial-test" ,rust-serial-test-0.5))))))
531
532 (define-public rust-cbindgen-0.15
533 (package
534 (inherit rust-cbindgen)
535 (name "rust-cbindgen")
536 (version "0.15.0")
537 (source
538 (origin
539 (method url-fetch)
540 (uri (crate-uri "cbindgen" version))
541 (file-name (string-append name "-" version ".tar.gz"))
542 (sha256
543 (base32 "0dgf49zij9rxnf0lv4k5gcmx1mxcz16czkk6q63anz0xp8ds3xhx"))))
544 (arguments
545 `(#:tests? #false ;missing files
546 #:cargo-inputs
547 (("rust-clap" ,rust-clap-2)
548 ("rust-heck" ,rust-heck-0.3)
549 ("rust-indexmap" ,rust-indexmap-1)
550 ("rust-log" ,rust-log-0.4)
551 ("rust-proc-macro2" ,rust-proc-macro2-1)
552 ("rust-quote" ,rust-quote-1)
553 ("rust-serde" ,rust-serde-1)
554 ("rust-serde-json" ,rust-serde-json-1)
555 ("rust-syn" ,rust-syn-1)
556 ("rust-tempfile" ,rust-tempfile-3)
557 ("rust-toml" ,rust-toml-0.5))))))
558
559 (define-public rust-cbindgen-0.14
560 (package
561 (inherit rust-cbindgen)
562 (name "rust-cbindgen")
563 (version "0.14.1")
564 (source
565 (origin
566 (method url-fetch)
567 (uri (crate-uri "cbindgen" version))
568 (file-name
569 (string-append name "-" version ".tar.gz"))
570 (sha256
571 (base32
572 "1ppwqbzydxlg9a24lynzfk60xrvqw4k31mpz1wrk6lbf88zf8nxi"))))))
573
574 (define-public rust-cbindgen-0.12
575 (package
576 (inherit rust-cbindgen)
577 (name "rust-cbindgen")
578 (version "0.12.2")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (crate-uri "cbindgen" version))
583 (file-name
584 (string-append name "-" version ".tar.gz"))
585 (sha256
586 (base32
587 "13jzbmjz1bmmfr0i80hw6ar484mgabx3hbpb2ynhk0ddqi0yr58m"))))))
588
589 (define-public tectonic
590 (package
591 (name "tectonic")
592 (version "0.5.2")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (crate-uri "tectonic" version))
597 (file-name (string-append name "-" version ".tar.gz"))
598 (sha256
599 (base32 "050d5slf3s6p58nzkqdqqx2bpwnjkyfk3y5bwfkrdiimfdi6k6yd"))))
600 (build-system cargo-build-system)
601 (arguments
602 `(#:rust ,rust-1.52
603 #:cargo-inputs
604 (("rust-app-dirs2" ,rust-app-dirs2-2)
605 ("rust-atty" ,rust-atty-0.2)
606 ("rust-byte-unit" ,rust-byte-unit-4)
607 ("rust-cfg-if" ,rust-cfg-if-1)
608 ("rust-error-chain" ,rust-error-chain-0.12)
609 ("rust-flate2" ,rust-flate2-1)
610 ("rust-fs2" ,rust-fs2-0.4)
611 ("rust-lazy-static" ,rust-lazy-static-1)
612 ("rust-libc" ,rust-libc-0.2)
613 ("rust-md-5" ,rust-md-5-0.9)
614 ("rust-open" ,rust-open-1)
615 ("rust-serde" ,rust-serde-1)
616 ("rust-sha2" ,rust-sha2-0.9)
617 ("rust-structopt" ,rust-structopt-0.3)
618 ("rust-tectonic-bridge-core" ,rust-tectonic-bridge-core-0.1)
619 ("rust-tectonic-engine-bibtex" ,rust-tectonic-engine-bibtex-0.1)
620 ("rust-tectonic-engine-xdvipdfmx" ,rust-tectonic-engine-xdvipdfmx-0.1)
621 ("rust-tectonic-engine-xetex" ,rust-tectonic-engine-xetex-0.1)
622 ("rust-tectonic-errors" ,rust-tectonic-errors-0.2)
623 ("rust-tectonic-geturl" ,rust-tectonic-geturl-0.2)
624 ("rust-tectonic-io-base" ,rust-tectonic-io-base-0.2)
625 ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.1)
626 ("rust-tectonic-xdv" ,rust-tectonic-xdv-0.1)
627 ("rust-tectonic-xetex-layout" ,rust-tectonic-xetex-layout-0.1)
628 ("rust-tempfile" ,rust-tempfile-3)
629 ("rust-termcolor" ,rust-termcolor-1)
630 ("rust-toml" ,rust-toml-0.5)
631 ("rust-url" ,rust-url-2)
632 ("rust-watchexec" ,rust-watchexec-1)
633 ("rust-zip" ,rust-zip-0.5))
634 #:cargo-development-inputs
635 (("rust-filetime" ,rust-filetime-0.2)
636 ("rust-futures" ,rust-futures-0.1)
637 ("rust-headers" ,rust-headers-0.2)
638 ("rust-hyper" ,rust-hyper-0.12)
639 ("rust-tempfile" ,rust-tempfile-3)
640 ("rust-tokio" ,rust-tokio-0.1))
641 #:phases
642 (modify-phases %standard-phases
643 (add-after 'install 'install-doc
644 (lambda* (#:key outputs #:allow-other-keys)
645 (let* ((out (assoc-ref outputs "out"))
646 (doc (string-append out "/share/doc/" ,name "-" ,version)))
647 (copy-recursively "docs/src" doc)))))))
648 (native-inputs
649 `(("pkg-config" ,pkg-config)))
650 (inputs
651 `(("fontconfig" ,fontconfig)
652 ("harfbuzz" ,harfbuzz)
653 ("openssl" ,openssl)
654 ("zlib" ,zlib)))
655 (home-page "https://tectonic-typesetting.github.io/")
656 (synopsis "Complete, embeddable TeX/LaTeX engine")
657 (description
658 "This package provides a modernized, complete, embeddable
659 TeX/LaTeX engine. Tectonic is forked from the XeTeX extension to the
660 classic Web2C implementation of TeX and uses the TeXLive distribution
661 of support files.")
662 (license license:expat)))
663
664 (define-public tokei
665 (package
666 (name "tokei")
667 (version "12.1.2")
668 (source
669 (origin
670 (method url-fetch)
671 (uri (crate-uri "tokei" version))
672 (file-name (string-append name "-" version ".tar.gz"))
673 (sha256
674 (base32 "000w549v1bpw7r57xw656p40ywf1gimvxxx5cjnri2js0xg927x4"))))
675 (build-system cargo-build-system)
676 (arguments
677 `(#:cargo-inputs
678 (("rust-aho-corasick" ,rust-aho-corasick-0.7)
679 ("rust-clap" ,rust-clap-2)
680 ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
681 ("rust-dashmap" ,rust-dashmap-4)
682 ("rust-dirs" ,rust-dirs-3)
683 ("rust-encoding-rs-io" ,rust-encoding-rs-io-0.1)
684 ("rust-env-logger" ,rust-env-logger-0.8)
685 ("rust-grep-searcher" ,rust-grep-searcher-0.1)
686 ("rust-hex" ,rust-hex-0.4)
687 ("rust-ignore" ,rust-ignore-0.4)
688 ("rust-log" ,rust-log-0.4)
689 ("rust-num-format" ,rust-num-format-0.4)
690 ("rust-once-cell" ,rust-once-cell-1)
691 ("rust-parking-lot" ,rust-parking-lot-0.11)
692 ("rust-rayon" ,rust-rayon-1)
693 ("rust-regex" ,rust-regex-1)
694 ("rust-serde" ,rust-serde-1)
695 ("rust-serde-cbor" ,rust-serde-cbor-0.11)
696 ("rust-serde-json" ,rust-serde-json-1)
697 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
698 ("rust-tera" ,rust-tera-1)
699 ("rust-term-size" ,rust-term-size-0.3)
700 ("rust-toml" ,rust-toml-0.5))
701 #:cargo-development-inputs
702 (("rust-git2" ,rust-git2-0.13)
703 ("rust-regex" ,rust-regex-1)
704 ("rust-tempfile" ,rust-tempfile-3))))
705 (native-inputs
706 `(("pkg-config" ,pkg-config)))
707 (inputs
708 `(("libgit2" ,libgit2)
709 ("openssl" ,openssl)
710 ("zlib" ,zlib)))
711 (home-page "https://tokei.rs")
712 (synopsis "Count code, quickly")
713 (description
714 "Tokei is a program that displays statistics about your code. Tokei will
715 show number of files, total lines within those files and code, comments, and
716 blanks grouped by language.")
717 (license (list license:expat license:asl2.0))))
718
719 (define-public watchexec
720 (package
721 (name "watchexec")
722 (version "1.16.1")
723 (source
724 (origin
725 (method url-fetch)
726 (uri (crate-uri "watchexec-cli" version))
727 (file-name (string-append name "-" version ".tar.gz"))
728 (sha256
729 (base32 "1wp424gzw1zmax5yy5gya15knl24rjx8gi9c7palvq807q3cnj65"))))
730 (build-system cargo-build-system)
731 (arguments
732 `(#:phases
733 (modify-phases %standard-phases
734 (add-after 'install 'install-completions
735 (lambda* (#:key outputs #:allow-other-keys)
736 (let* ((out (assoc-ref outputs "out"))
737 (zsh (string-append out "/share/zsh/site-functions/_watchexec"))
738 (doc (string-append out "/share/doc/watchexec-" ,version)))
739 (mkdir-p (dirname zsh))
740 ;; FIXME: The crates.io source does not provide zsh
741 ;; completions. But the GitHub source does not compile.
742 ;;
743 ;; (copy-file "completions/zsh" zsh)
744 (install-file "README.md" doc)))))
745 #:cargo-inputs
746 (("rust-clap" ,rust-clap-2)
747 ("rust-embed-resource" ,rust-embed-resource-1)
748 ("rust-env-logger" ,rust-env-logger-0.8)
749 ("rust-log" ,rust-log-0.4)
750 ("rust-watchexec" ,rust-watchexec-1))
751 #:cargo-development-inputs
752 (("rust-assert-cmd" ,rust-assert-cmd-1)
753 ("rust-insta" ,rust-insta-1))))
754 (home-page "https://github.com/watchexec/watchexec")
755 (synopsis "Executes commands in response to file modifications")
756 (description
757 "@command{watchexec} is a simple, standalone tool that watches a path and
758 runs a command whenever it detects modifications.")
759 (license license:asl2.0)))
760
761 (define-public rust-cargo-c
762 (package
763 (name "rust-cargo-c")
764 (version "0.8.1+cargo-0.53")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (crate-uri "cargo-c" version))
769 (file-name
770 (string-append name "-" version ".tar.gz"))
771 (sha256
772 (base32
773 "0fwdxhdj2963xr6xfqr56i7hikhsdv562vgxq2dj3h2mi3dil1k6"))))
774 (build-system cargo-build-system)
775 (arguments
776 `(#:rust ,rust-1.52 ;inherited from rust-cargo
777 #:cargo-inputs
778 (("rust-cbindgen" ,rust-cbindgen-0.19)
779 ("rust-cargo" ,rust-cargo-0.53) ;
780 ("rust-anyhow" ,rust-anyhow-1)
781 ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.4)
782 ("rust-structopt" ,rust-structopt-0.3)
783 ("rust-log" ,rust-log-0.4)
784 ("rust-toml" ,rust-toml-0.5)
785 ("rust-cargo-metadata" ,rust-cargo-metadata-0.9)
786 ("rust-semver" ,rust-semver-0.10)
787 ("rust-serde" ,rust-serde-1)
788 ("rust-serde-derive" ,rust-serde-derive-1)
789 ("rust-serde-json" ,rust-serde-json-1)
790 ("rust-regex" ,rust-regex-1))))
791 (native-inputs
792 `(("pkg-config" ,pkg-config)))
793 (inputs
794 `(("curl" ,curl)
795 ("libssh2" ,libssh2)
796 ("openssl" ,openssl)
797 ("zlib" ,zlib)))
798 (home-page "https://github.com/lu-zero/cargo-c")
799 (synopsis "Build and install C-compatible libraries")
800 (description
801 "This package produces and installs a correct pkg-config file, a static
802 library and a dynamic library, and a C header to be used by any C (and
803 C-compatible) software.")
804 (license license:expat)))
805
806 (define-public zoxide
807 (package
808 (name "zoxide")
809 (version "0.6.0")
810 (source
811 (origin
812 (method url-fetch)
813 (uri (crate-uri "zoxide" version))
814 (file-name (string-append name "-" version ".tar.gz"))
815 (sha256
816 (base32 "1ih01l3xp8plicxhmyxjkq12ncpdb8954jcj3dh3lwvkhvw29nkk"))))
817 (build-system cargo-build-system)
818 (arguments
819 `(#:cargo-inputs
820 (("rust-anyhow" ,rust-anyhow-1)
821 ("rust-askama" ,rust-askama-0.10)
822 ("rust-bincode" ,rust-bincode-1)
823 ("rust-clap" ,rust-clap-3)
824 ("rust-dirs-next" ,rust-dirs-next-2)
825 ("rust-dunce" ,rust-dunce-1)
826 ("rust-glob" ,rust-glob-0.3)
827 ("rust-once-cell" ,rust-once-cell-1)
828 ("rust-ordered-float" ,rust-ordered-float-2)
829 ("rust-rand" ,rust-rand-0.7)
830 ("rust-serde" ,rust-serde-1)
831 ("rust-tempfile" ,rust-tempfile-3))
832 #:cargo-development-inputs
833 (("rust-assert-cmd" ,rust-assert-cmd-1)
834 ("rust-seq-macro" ,rust-seq-macro-0.2))))
835 (home-page "https://github.com/ajeetdsouza/zoxide/")
836 (synopsis "Fast way to navigate your file system")
837 (description
838 "Zoxide is a fast replacement for your @command{cd} command. It keeps
839 track of the directories you use most frequently, and uses a ranking algorithm
840 to navigate to the best match.")
841 (license license:expat)))