gnu: Add drill.
[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 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages rust-apps)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix build-system cargo)
31 #:use-module (guix download)
32 #:use-module (guix packages)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages crates-io)
35 #:use-module (gnu packages crates-graphics)
36 #:use-module (gnu packages documentation)
37 #:use-module (gnu packages fontutils)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages jemalloc)
40 #:use-module (gnu packages pcre)
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages tls)
43 #:use-module (gnu packages version-control))
44
45 (define-public bat
46 (package
47 (name "bat")
48 (version "0.17.1")
49 (source
50 (origin
51 (method url-fetch)
52 (uri (crate-uri "bat" version))
53 (file-name (string-append name "-" version ".tar.gz"))
54 (sha256
55 (base32 "1ia12774prjnm3msiaja6qdpxkpyknxswqpgkmwzj0wn9nhkc7nz"))))
56 (build-system cargo-build-system)
57 (arguments
58 `(#:cargo-inputs
59 (("rust-ansi-colours" ,rust-ansi-colours-1)
60 ("rust-ansi-term" ,rust-ansi-term-0.12)
61 ("rust-atty" ,rust-atty-0.2)
62 ("rust-clap" ,rust-clap-2)
63 ("rust-console" ,rust-console-0.13)
64 ("rust-content-inspector" ,rust-content-inspector-0.2)
65 ("rust-dirs" ,rust-dirs-3)
66 ("rust-encoding" ,rust-encoding-0.2)
67 ("rust-error-chain" ,rust-error-chain-0.12)
68 ("rust-git2" ,rust-git2-0.13)
69 ("rust-globset" ,rust-globset-0.4)
70 ("rust-lazy-static" ,rust-lazy-static-1)
71 ("rust-path-abs" ,rust-path-abs-0.5)
72 ("rust-semver" ,rust-semver-0.11)
73 ("rust-serde" ,rust-serde-1)
74 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
75 ("rust-shell-words" ,rust-shell-words-1)
76 ("rust-syntect" ,rust-syntect-4)
77 ("rust-unicode-width" ,rust-unicode-width-0.1)
78 ("rust-wild" ,rust-wild-2))
79 #:cargo-development-inputs
80 (("rust-assert-cmd" ,rust-assert-cmd-1)
81 ("rust-predicates" ,rust-predicates-1)
82 ("rust-tempdir" ,rust-tempdir-0.3))))
83 (native-inputs
84 `(("pkg-config" ,pkg-config)))
85 (inputs
86 `(("libgit2" ,libgit2)
87 ("zlib" ,zlib)))
88 (home-page "https://github.com/sharkdp/bat")
89 (synopsis "@command{cat} clone with syntax highlighting and git integration")
90 (description
91 "@command{bat} is a drop-in @command{cat} replacement featuring syntax
92 highlighting for a large number of languages, git integration, and automatic
93 paging.")
94 (license (list license:expat license:asl2.0))))
95
96 (define-public drill
97 (package
98 (name "drill")
99 (version "0.7.1")
100 (source
101 (origin
102 (method url-fetch)
103 (uri (crate-uri "drill" version))
104 (file-name (string-append name "-" version ".tar.gz"))
105 (sha256
106 (base32 "1m73d7rzi0p5c1hn0081d2235kcyapdza7h0vqf5jhnirpnjn793"))))
107 (build-system cargo-build-system)
108 (arguments
109 `(#:cargo-inputs
110 (("rust-async-trait" ,rust-async-trait-0.1)
111 ("rust-clap" ,rust-clap-2)
112 ("rust-colored" ,rust-colored-1)
113 ("rust-csv" ,rust-csv-1)
114 ("rust-futures" ,rust-futures-0.3)
115 ("rust-lazy-static" ,rust-lazy-static-1)
116 ("rust-linked-hash-map" ,rust-linked-hash-map-0.5)
117 ("rust-num-cpus" ,rust-num-cpus-1)
118 ("rust-rand" ,rust-rand-0.7)
119 ("rust-regex" ,rust-regex-1)
120 ("rust-reqwest" ,rust-reqwest-0.10)
121 ("rust-serde" ,rust-serde-1)
122 ("rust-serde-json" ,rust-serde-json-1)
123 ("rust-tokio" ,rust-tokio-0.2)
124 ("rust-url" ,rust-url-2)
125 ("rust-yaml-rust" ,rust-yaml-rust-0.4))))
126 (native-inputs
127 `(("pkg-config" ,pkg-config)))
128 (inputs
129 `(("openssl" ,openssl)))
130 (home-page "https://github.com/fcsonline/drill")
131 (synopsis "HTTP load testing application")
132 (description
133 "Drill is a HTTP load testing application written in Rust inspired by
134 Ansible syntax. Benchmark files can be written in YAML.")
135 (license license:gpl3)))
136
137 (define-public exa
138 (package
139 (name "exa")
140 (version "0.9.0")
141 (source
142 (origin
143 (method url-fetch)
144 (uri (crate-uri "exa" version))
145 (file-name
146 (string-append name "-" version ".tar.gz"))
147 (sha256
148 (base32
149 "1s902xgplz1167k0r7x235p914lprpsqy2if0kpa1mlb0fswqqq4"))))
150 (build-system cargo-build-system)
151 (arguments
152 `(#:cargo-inputs
153 (("rust-ansi-term" ,rust-ansi-term-0.12)
154 ("rust-datetime" ,rust-datetime-0.4)
155 ("rust-env-logger" ,rust-env-logger-0.6)
156 ("rust-git2" ,rust-git2-0.9)
157 ("rust-glob" ,rust-glob-0.3)
158 ("rust-lazy-static" ,rust-lazy-static-1)
159 ("rust-libc" ,rust-libc-0.2)
160 ("rust-locale" ,rust-locale-0.2)
161 ("rust-log" ,rust-log-0.4)
162 ("rust-natord" ,rust-natord-1.0)
163 ("rust-num-cpus" ,rust-num-cpus-1)
164 ("rust-number-prefix" ,rust-number-prefix-0.3)
165 ("rust-scoped-threadpool" ,rust-scoped-threadpool-0.1)
166 ("rust-term-grid" ,rust-term-grid-0.1)
167 ("rust-term-size" ,rust-term-size-0.3)
168 ("rust-unicode-width" ,rust-unicode-width-0.1)
169 ("rust-users" ,rust-users-0.9)
170 ("rust-zoneinfo-compiled" ,rust-zoneinfo-compiled-0.4))
171 #:cargo-development-inputs
172 (("rust-datetime" ,rust-datetime-0.4))
173 #:phases
174 (modify-phases %standard-phases
175 ;; Ignoring failing tests.
176 ;; Reported in https://github.com/ogham/exa/issues/318
177 (add-before 'check 'disable-failing-tests
178 (lambda _
179 (substitute* "src/options/mod.rs"
180 (("^.*fn oneline_across.*" oneline-across)
181 (string-append "#[ignore]\n" oneline-across)))
182
183 (substitute* "src/options/view.rs"
184 (("test!\\(across:.*") "")
185 (("test!\\(cr:.*") "")
186 (("test!\\(empty:.*") "")
187 (("test!\\(gracross:.*") "")
188 (("test!\\(grid:.*") "")
189 (("test!\\(icons:.*") "")
190 (("test!\\(just_binary:.*") "")
191 (("test!\\(just_blocks:.*") "")
192 (("test!\\(just_bytes:.*") "")
193 (("test!\\(just_git:.*") "")
194 (("test!\\(just_group:.*") "")
195 (("test!\\(just_header:.*") "")
196 (("test!\\(just_inode:.*") "")
197 (("test!\\(just_links:.*") "")
198 (("test!\\(leg:.*") "")
199 (("test!\\(lid:.*") "")
200 (("test!\\(original_g:.*") ""))
201 #t))
202 (add-after 'install 'install-extras
203 (lambda* (#:key outputs #:allow-other-keys)
204 (let* ((out (assoc-ref outputs "out"))
205 (share (string-append out "/share"))
206 (man1 (string-append share "/man/man1")))
207 (install-file "contrib/man/exa.1" man1)
208 (mkdir-p (string-append out "/etc/bash_completion.d"))
209 (mkdir-p (string-append share "/fish/vendor_completions.d"))
210 (mkdir-p (string-append share "/zsh/site-functions"))
211 (copy-file "contrib/completions.bash"
212 (string-append out "/etc/bash_completion.d/exa"))
213 (copy-file "contrib/completions.fish"
214 (string-append share "/fish/vendor_completions.d/exa.fish"))
215 (copy-file "contrib/completions.zsh"
216 (string-append share "/zsh/site-functions/_exa"))
217 #t))))))
218 (inputs
219 `(("libgit2" ,libgit2)
220 ("zlib" ,zlib)))
221 (native-inputs
222 `(("pkg-config" ,pkg-config)))
223 (home-page "https://the.exa.website/")
224 (synopsis "Modern replacement for ls")
225 (description "@code{exa} is a modern replacement for the command-line
226 program @code{ls}. It uses colours to distinguish file types and metadata. It
227 also knows about symlinks, extended attributes, and Git.")
228 (license license:expat)))
229
230 (define-public fd
231 (package
232 (name "fd")
233 (version "8.1.1")
234 (source
235 (origin
236 (method url-fetch)
237 (uri (crate-uri "fd-find" version))
238 (file-name
239 (string-append name "-" version ".tar.gz"))
240 (sha256
241 (base32
242 "124a5r8hpk2phs1288jybh34d48yxy44wr7gv5ggchs272gs2jam"))))
243 (build-system cargo-build-system)
244 (arguments
245 `(#:cargo-inputs
246 (("rust-ansi-term" ,rust-ansi-term-0.12)
247 ("rust-anyhow" ,rust-anyhow-1)
248 ("rust-atty" ,rust-atty-0.2)
249 ("rust-clap" ,rust-clap-2)
250 ("rust-ctrlc" ,rust-ctrlc-3.1)
251 ("rust-dirs" ,rust-dirs-2.0)
252 ("rust-globset" ,rust-globset-0.4)
253 ("rust-humantime" ,rust-humantime-2)
254 ("rust-ignore" ,rust-ignore-0.4)
255 ("rust-jemallocator" ,rust-jemallocator-0.3)
256 ("rust-lazy-static" ,rust-lazy-static-1)
257 ("rust-libc" ,rust-libc-0.2)
258 ("rust-lscolors" ,rust-lscolors-0.7)
259 ("rust-num-cpus" ,rust-num-cpus-1)
260 ("rust-regex" ,rust-regex-1)
261 ("rust-regex-syntax" ,rust-regex-syntax-0.6)
262 ("rust-users" ,rust-users-0.10)
263 ("rust-version-check" ,rust-version-check-0.9))
264 #:cargo-development-inputs
265 (("rust-diff" ,rust-diff-0.1)
266 ("rust-filetime" ,rust-filetime-0.2)
267 ("rust-tempdir" ,rust-tempdir-0.3))
268 #:phases
269 (modify-phases %standard-phases
270 (add-after 'unpack 'override-jemalloc
271 (lambda* (#:key inputs #:allow-other-keys)
272 (let ((jemalloc (assoc-ref inputs "jemalloc")))
273 (setenv "JEMALLOC_OVERRIDE"
274 (string-append jemalloc "/lib/libjemalloc.so")))
275 #t))
276 (add-after 'install 'install-extra
277 (lambda* (#:key outputs #:allow-other-keys)
278 (let* ((out (assoc-ref outputs "out"))
279 (install-completion
280 (lambda (completion out-dir)
281 (for-each
282 (lambda (f)
283 (install-file f (string-append out out-dir)))
284 (find-files "target/release/build/" completion)))))
285 ;; Manpages
286 (install-file "doc/fd.1" (string-append out "/share/man/man1"))
287 ;; Completions
288 (install-completion "^fd.bash$" "/etc/bash_completion.d")
289 (install-completion "^fd.fish$" "/share/fish/vendor_completions.d")
290 (install-completion "^_fd$" "/share/zsh/site-functions")
291 (rename-file (string-append out "/etc/bash_completion.d/fd.bash")
292 (string-append out "/etc/bash_completion.d/fd"))
293 #t))))))
294 (inputs `(("jemalloc" ,jemalloc)))
295 (home-page "https://github.com/sharkdp/fd")
296 (synopsis "Simple, fast and user-friendly alternative to find")
297 (description
298 "@code{fd} is a simple, fast and user-friendly alternative to @code{find}.
299 While it does not seek to mirror all of find's powerful functionality, it
300 provides defaults for 80% of the use cases.")
301 (license (list license:expat license:asl2.0))))
302
303 (define-public hexyl
304 (package
305 (name "hexyl")
306 (version "0.8.0")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (crate-uri "hexyl" version))
311 (file-name
312 (string-append name "-" version ".tar.gz"))
313 (sha256
314 (base32
315 "0sipag77196467idbznbk5q5lwhqz85zw7y1pwg9b27jxqyk04rp"))))
316 (build-system cargo-build-system)
317 (arguments
318 `(#:cargo-inputs
319 (("rust-ansi-term" ,rust-ansi-term-0.12)
320 ("rust-atty" ,rust-atty-0.2)
321 ("rust-clap" ,rust-clap-2)
322 ("rust-libc" ,rust-libc-0.2))))
323 (home-page "https://github.com/sharkdp/hexyl")
324 (synopsis "Command-line hex viewer")
325 (description
326 "This package provides a command line hex viewer. It uses a colored output
327 for distinguishing different kinds of bytes such as NULL bytes, printable ASCII
328 characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
329 (license (list license:expat license:asl2.0))))
330
331 (define-public ripgrep
332 (package
333 (name "ripgrep")
334 (version "12.1.1")
335 (source
336 (origin
337 (method url-fetch)
338 (uri (crate-uri "ripgrep" version))
339 (file-name
340 (string-append name "-" version ".tar.gz"))
341 (sha256
342 (base32
343 "1grfi0j9zczzipipc21lkdbqmd2lvy2wlqy65fy4sckqvix5amdr"))))
344 (build-system cargo-build-system)
345 (arguments
346 `(#:cargo-inputs
347 (("rust-bstr" ,rust-bstr-0.2)
348 ("rust-clap" ,rust-clap-2)
349 ("rust-grep" ,rust-grep-0.2)
350 ("rust-ignore" ,rust-ignore-0.4)
351 ("rust-jemallocator" ,rust-jemallocator-0.3)
352 ("rust-lazy-static" ,rust-lazy-static-1)
353 ("rust-log" ,rust-log-0.4)
354 ("rust-num-cpus" ,rust-num-cpus-1)
355 ("rust-regex" ,rust-regex-1)
356 ("rust-serde-json" ,rust-serde-json-1)
357 ("rust-termcolor" ,rust-termcolor-1))
358 #:cargo-development-inputs
359 (("rust-serde" ,rust-serde-1)
360 ("rust-serde-derive" ,rust-serde-derive-1))
361 #:modules ((ice-9 match)
362 (guix build cargo-build-system)
363 (guix build utils))
364 #:phases
365 (modify-phases %standard-phases
366 (add-after 'build 'install-manpage
367 ;; NOTE: This is done before 'check so that there's only one output
368 ;; directory with the man page.
369 (lambda* (#:key outputs #:allow-other-keys)
370 (match (find-files "target" "^rg\\.1$")
371 ((manpage)
372 (install-file manpage (string-append
373 (assoc-ref outputs "out")
374 "/share/man/man1"))))
375 #t)))
376 #:features '("pcre2")))
377 (native-inputs
378 `(("asciidoc" ,asciidoc)
379 ("pcre2" ,pcre2)
380 ("pkg-config" ,pkg-config)))
381 (home-page "https://github.com/BurntSushi/ripgrep")
382 (synopsis "Line-oriented search tool")
383 (description
384 "ripgrep is a line-oriented search tool that recursively searches
385 your current directory for a regex pattern while respecting your
386 gitignore rules.")
387 (license (list license:unlicense license:expat))))
388
389 (define-public rust-cbindgen
390 (package
391 (name "rust-cbindgen")
392 (version "0.13.2")
393 (source
394 (origin
395 (method url-fetch)
396 (uri (crate-uri "cbindgen" version))
397 (file-name (string-append name "-" version ".crate"))
398 (sha256
399 (base32
400 "0673pq96hs7waavkv58v2pakpxpsfyjvbraa5kyl2b44phgdzcid"))))
401 (build-system cargo-build-system)
402 (arguments
403 `(#:cargo-inputs
404 (("clap" ,rust-clap-2)
405 ("log" ,rust-log-0.4)
406 ("proc-macro2" ,rust-proc-macro2-1)
407 ("quote" ,rust-quote-1)
408 ("serde" ,rust-serde-1)
409 ("serde-json" ,rust-serde-json-1)
410 ("syn" ,rust-syn-1)
411 ("tempfile" ,rust-tempfile-3)
412 ("toml" ,rust-toml-0.5))))
413 (home-page "https://github.com/eqrion/cbindgen/")
414 (synopsis "Tool for generating C bindings to Rust code")
415 (description
416 "This package provides a tool for generating C/C++ bindings to Rust code.")
417 (license license:mpl2.0)))
418
419 (define-public rust-cbindgen-0.16
420 (package
421 (inherit rust-cbindgen)
422 (name "rust-cbindgen")
423 (version "0.16.0")
424 (source
425 (origin
426 (method url-fetch)
427 (uri (crate-uri "cbindgen" version))
428 (file-name (string-append name "-" version ".tar.gz"))
429 (sha256
430 (base32 "049cai626nzw0km03parx4sxwaxgbr7i5ifjbjwnfxkqkj5k2i4k"))))
431 (arguments
432 `(#:tests? #false ;missing files
433 #:cargo-inputs
434 (("rust-clap" ,rust-clap-2)
435 ("rust-heck" ,rust-heck-0.3)
436 ("rust-indexmap" ,rust-indexmap-1)
437 ("rust-log" ,rust-log-0.4)
438 ("rust-proc-macro2" ,rust-proc-macro2-1)
439 ("rust-quote" ,rust-quote-1)
440 ("rust-serde" ,rust-serde-1)
441 ("rust-serde-json" ,rust-serde-json-1)
442 ("rust-syn" ,rust-syn-1)
443 ("rust-tempfile" ,rust-tempfile-3)
444 ("rust-toml" ,rust-toml-0.5))
445 #:cargo-development-inputs
446 (("rust-serial-test" ,rust-serial-test-0.5))))))
447
448 (define-public rust-cbindgen-0.15
449 (package
450 (inherit rust-cbindgen)
451 (name "rust-cbindgen")
452 (version "0.15.0")
453 (source
454 (origin
455 (method url-fetch)
456 (uri (crate-uri "cbindgen" version))
457 (file-name (string-append name "-" version ".tar.gz"))
458 (sha256
459 (base32 "0dgf49zij9rxnf0lv4k5gcmx1mxcz16czkk6q63anz0xp8ds3xhx"))))
460 (arguments
461 `(#:tests? #false ;missing files
462 #:cargo-inputs
463 (("rust-clap" ,rust-clap-2)
464 ("rust-heck" ,rust-heck-0.3)
465 ("rust-indexmap" ,rust-indexmap-1)
466 ("rust-log" ,rust-log-0.4)
467 ("rust-proc-macro2" ,rust-proc-macro2-1)
468 ("rust-quote" ,rust-quote-1)
469 ("rust-serde" ,rust-serde-1)
470 ("rust-serde-json" ,rust-serde-json-1)
471 ("rust-syn" ,rust-syn-1)
472 ("rust-tempfile" ,rust-tempfile-3)
473 ("rust-toml" ,rust-toml-0.5))))))
474
475 (define-public rust-cbindgen-0.14
476 (package
477 (inherit rust-cbindgen)
478 (name "rust-cbindgen")
479 (version "0.14.1")
480 (source
481 (origin
482 (method url-fetch)
483 (uri (crate-uri "cbindgen" version))
484 (file-name
485 (string-append name "-" version ".tar.gz"))
486 (sha256
487 (base32
488 "1ppwqbzydxlg9a24lynzfk60xrvqw4k31mpz1wrk6lbf88zf8nxi"))))))
489
490 (define-public rust-cbindgen-0.12
491 (package
492 (inherit rust-cbindgen)
493 (name "rust-cbindgen")
494 (version "0.12.2")
495 (source
496 (origin
497 (method url-fetch)
498 (uri (crate-uri "cbindgen" version))
499 (file-name
500 (string-append name "-" version ".tar.gz"))
501 (sha256
502 (base32
503 "13jzbmjz1bmmfr0i80hw6ar484mgabx3hbpb2ynhk0ddqi0yr58m"))))))
504
505 (define-public tectonic
506 (package
507 (name "tectonic")
508 (version "0.4.1")
509 (source
510 (origin
511 (method url-fetch)
512 (uri (crate-uri "tectonic" version))
513 (file-name (string-append name "-" version ".tar.gz"))
514 (sha256
515 (base32 "16fm2bfvfizrydmirzf0bhr1fidb5slcbvr6150and8yqr8jc4lf"))))
516 (build-system cargo-build-system)
517 (arguments
518 `(#:cargo-inputs
519 (("rust-app-dirs2" ,rust-app-dirs2-2)
520 ("rust-atty" ,rust-atty-0.2)
521 ("rust-byte-unit" ,rust-byte-unit-4)
522 ("rust-cbindgen" ,rust-cbindgen-0.16)
523 ("rust-cc" ,rust-cc-1)
524 ("rust-cfg-if" ,rust-cfg-if-1)
525 ("rust-error-chain" ,rust-error-chain-0.12)
526 ("rust-flate2" ,rust-flate2-1)
527 ("rust-fs2" ,rust-fs2-0.4)
528 ("rust-headers" ,rust-headers-0.2)
529 ("rust-lazy-static" ,rust-lazy-static-1)
530 ("rust-libc" ,rust-libc-0.2)
531 ("rust-md-5" ,rust-md-5-0.9)
532 ("rust-pkg-config" ,rust-pkg-config-0.3)
533 ("rust-regex" ,rust-regex-1)
534 ("rust-reqwest" ,rust-reqwest-0.9)
535 ("rust-serde" ,rust-serde-1)
536 ("rust-sha2" ,rust-sha2-0.9)
537 ("rust-structopt" ,rust-structopt-0.3)
538 ("rust-tectonic-cfg-support" ,rust-tectonic-cfg-support-0.1)
539 ("rust-tectonic-xdv" ,rust-tectonic-xdv-0.1)
540 ("rust-tempfile" ,rust-tempfile-3)
541 ("rust-termcolor" ,rust-termcolor-1)
542 ("rust-toml" ,rust-toml-0.5)
543 ("rust-vcpkg" ,rust-vcpkg-0.2)
544 ("rust-zip" ,rust-zip-0.5))
545 #:cargo-development-inputs
546 (("rust-filetime" ,rust-filetime-0.2)
547 ("rust-futures" ,rust-futures-0.1)
548 ("rust-headers" ,rust-headers-0.2)
549 ("rust-hyper" ,rust-hyper-0.12)
550 ("rust-tempfile" ,rust-tempfile-3)
551 ("rust-tokio" ,rust-tokio-0.1))
552 #:phases
553 (modify-phases %standard-phases
554 (add-after 'install 'install-doc
555 (lambda* (#:key outputs #:allow-other-keys)
556 (let* ((out (assoc-ref outputs "out"))
557 (doc (string-append out "/share/doc/" ,name "-" ,version)))
558 (copy-recursively "docs/src" doc)
559 #t))))))
560 (native-inputs
561 `(("pkg-config" ,pkg-config)))
562 (inputs
563 `(("fontconfig" ,fontconfig)
564 ("harfbuzz" ,harfbuzz)
565 ("openssl" ,openssl)
566 ("zlib" ,zlib)))
567 (home-page "https://tectonic-typesetting.github.io/")
568 (synopsis "Complete, embeddable TeX/LaTeX engine")
569 (description
570 "This package provides a modernized, complete, embeddable
571 TeX/LaTeX engine. Tectonic is forked from the XeTeX extension to the
572 classic Web2C implementation of TeX and uses the TeXLive distribution
573 of support files.")
574 (license license:expat)))
575
576 (define-public tokei
577 (package
578 (name "tokei")
579 (version "10.1.1")
580 (source
581 (origin
582 (method url-fetch)
583 (uri (crate-uri "tokei" version))
584 (file-name
585 (string-append name "-" version ".tar.gz"))
586 (sha256
587 (base32
588 "07f5laqw2k9l3k8wrg9h8p2m5d9hkfxngyacwrn3vs7mlnw8l81m"))))
589 (build-system cargo-build-system)
590 (arguments
591 `(#:cargo-inputs
592 (("rust-clap" ,rust-clap-2)
593 ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
594 ("rust-dirs" ,rust-dirs-2.0)
595 ("rust-encoding-rs-io" ,rust-encoding-rs-io-0.1)
596 ("rust-env-logger" ,rust-env-logger-0.7)
597 ("rust-grep-searcher" ,rust-grep-searcher-0.1)
598 ("rust-hex" ,rust-hex-0.4)
599 ("rust-ignore" ,rust-ignore-0.4)
600 ("rust-log" ,rust-log-0.4)
601 ("rust-rayon" ,rust-rayon-1)
602 ("rust-serde" ,rust-serde-1)
603 ("rust-serde-cbor" ,rust-serde-cbor-0.10)
604 ("rust-serde-derive" ,rust-serde-derive-1)
605 ("rust-serde-json" ,rust-serde-json-1)
606 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
607 ("rust-term-size" ,rust-term-size-0.3)
608 ("rust-toml" ,rust-toml-0.5))
609 #:cargo-development-inputs
610 (("rust-git2" ,rust-git2-0.11)
611 ("rust-handlebars" ,rust-handlebars-2.0)
612 ("rust-ignore" ,rust-ignore-0.4)
613 ("rust-lazy-static" ,rust-lazy-static-1)
614 ("rust-regex" ,rust-regex-1)
615 ("rust-serde-json" ,rust-serde-json-1)
616 ("rust-tempfile" ,rust-tempfile-3))))
617 (native-inputs
618 `(("pkg-config" ,pkg-config)))
619 (inputs
620 `(("libgit2" ,libgit2)
621 ("openssl" ,openssl)
622 ("zlib" ,zlib)))
623 (home-page "https://tokei.rs")
624 (synopsis "Count code, quickly")
625 (description
626 "Tokei is a program that displays statistics about your code. Tokei will
627 show number of files, total lines within those files and code, comments, and
628 blanks grouped by language.")
629 (license (list license:expat license:asl2.0))))
630
631 (define-public watchexec
632 (package
633 (name "watchexec")
634 (version "1.14.1")
635 (source
636 (origin
637 (method url-fetch)
638 (uri (crate-uri "watchexec" version))
639 (file-name
640 (string-append name "-" version ".tar.gz"))
641 (sha256
642 (base32 "1vqaa462sjpzi0crh12ixqc2wa5bblirc129pnj8jr8iz3xw3gvd"))))
643 (build-system cargo-build-system)
644 (arguments
645 `(#:phases
646 (modify-phases %standard-phases
647 (add-after 'install 'install-completions
648 (lambda* (#:key outputs #:allow-other-keys)
649 (let* ((out (assoc-ref outputs "out"))
650 (zsh (string-append out "/share/zsh/site-functions/_watchexec"))
651 (doc (string-append out "/share/doc/watchexec-" ,version)))
652 (mkdir-p (dirname zsh))
653 (copy-file "completions/zsh" zsh)
654 (install-file "README.md" doc)
655 #t))))
656 #:cargo-inputs
657 (("rust-embed-resource" ,rust-embed-resource-1.3)
658 ("rust-derive-builder" ,rust-derive-builder-0.9)
659 ("rust-env-logger" ,rust-env-logger-0.7)
660 ("rust-glob" ,rust-glob-0.3)
661 ("rust-globset" ,rust-globset-0.4)
662 ("rust-lazy-static" ,rust-lazy-static-1)
663 ("rust-log" ,rust-log-0.4)
664 ("rust-nix" ,rust-nix-0.17)
665 ("rust-notify" ,rust-notify-4)
666 ("rust-walkdir" ,rust-walkdir-2))))
667 (home-page "https://github.com/watchexec/watchexec")
668 (synopsis "Executes commands in response to file modifications")
669 (description
670 "@command{watchexec} is a simple, standalone tool that watches a path and runs
671 a command whenever it detects modifications.
672
673 Example use cases:
674 @itemize @bullet
675 @item Automatically run unit tests
676 @item Run linters/syntax checkers
677 @end itemize
678
679 Features:
680 @itemize @bullet
681 @item Coalesces multiple file system events into one, for editors that
682 use swap/backup files during saving
683 @item By default, uses @code{.gitignore} and @code{.ignore} to determine which
684 files to ignore notifications for
685 @item Supports watching files with a specific extension
686 @item Supports filtering/ignoring events based on glob patterns
687 @item Launches child processes in a new process group
688 @item Sets environment variables that allow the executed program to learn
689 the details of how it was triggered.
690 @end itemize")
691 (license license:asl2.0)))
692
693 (define-public rust-cargo-c
694 (package
695 (name "rust-cargo-c")
696 (version "0.5.3")
697 (source
698 (origin
699 (method url-fetch)
700 (uri (crate-uri "cargo-c" version))
701 (file-name
702 (string-append name "-" version ".tar.gz"))
703 (sha256
704 (base32
705 "0hsag5g4qngm8alfil2dyvl5sagpqi5nb40c7bhwng2z8mv9r41k"))))
706 (build-system cargo-build-system)
707 (arguments
708 `(#:cargo-inputs
709 (("rust-cbindgen" ,rust-cbindgen)
710 ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.4)
711 ("rust-structopt" ,rust-structopt-0.3)
712 ("rust-log" ,rust-log-0.4)
713 ("rust-toml" ,rust-toml-0.5)
714 ("rust-cargo-metadata" ,rust-cargo-metadata-0.9)
715 ("rust-serde" ,rust-serde-1)
716 ("rust-serde-derive" ,rust-serde-derive-1)
717 ("rust-regex" ,rust-regex-1))))
718 (home-page "https://github.com/lu-zero/cargo-c")
719 (synopsis "Build and install C-compatible libraries")
720 (description
721 "This package produces and installs a correct pkg-config file, a static
722 library and a dynamic library, and a C header to be used by any C (and
723 C-compatible) software.")
724 (license license:expat)))