5108ade3c9c4197e87485e18ab3b9dcbebd4de1c
[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 git-download)
36 #:use-module (guix packages)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages crates-io)
39 #:use-module (gnu packages crates-graphics)
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages documentation)
42 #:use-module (gnu packages fontutils)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages jemalloc)
45 #:use-module (gnu packages ssh)
46 #:use-module (gnu packages pcre)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages python-xyz)
49 #:use-module (gnu packages rust)
50 #:use-module (gnu packages tls)
51 #:use-module (gnu packages version-control))
52
53 (define-public agate
54 (package
55 (name "agate")
56 (version "2.5.2")
57 (source
58 (origin
59 (method url-fetch)
60 (uri (crate-uri "agate" version))
61 (file-name (string-append name "-" version ".tar.gz"))
62 (sha256
63 (base32 "1mhrl4j5r6wzsnwpqsbgzny5vqschyjm3gnk4y88har7skk7j19v"))))
64 (build-system cargo-build-system)
65 (arguments
66 `(#:cargo-inputs
67 (("rust-configparser" ,rust-configparser-2)
68 ("rust-env-logger" ,rust-env-logger-0.8)
69 ("rust-getopts" ,rust-getopts-0.2)
70 ("rust-glob" ,rust-glob-0.3)
71 ("rust-log" ,rust-log-0.4)
72 ("rust-mime-guess" ,rust-mime-guess-2)
73 ("rust-once-cell" ,rust-once-cell-1)
74 ("rust-percent-encoding" ,rust-percent-encoding-2)
75 ("rust-rustls" ,rust-rustls-0.19)
76 ("rust-tokio" ,rust-tokio-1)
77 ("rust-tokio-rustls" ,rust-tokio-rustls-0.22)
78 ("rust-url" ,rust-url-2))))
79 (home-page "https://github.com/mbrubeck/agate")
80 (synopsis "Very simple server for the Gemini hypertext protocol")
81 (description
82 "Agate is a server for the Gemini network protocol, built with the Rust
83 programming language. It has very few features, and can only serve static
84 files. It uses async I/O, and should be quite efficient even when running on
85 low-end hardware and serving many concurrent requests.")
86 (license (list license:expat license:asl2.0))))
87
88 (define-public bat
89 (package
90 (name "bat")
91 (version "0.18.1")
92 (source
93 (origin
94 (method url-fetch)
95 (uri (crate-uri "bat" version))
96 (file-name (string-append name "-" version ".tar.gz"))
97 (sha256
98 (base32 "0nvqkddpjxsmd27gqn8czql07faad50mihin5ivb9sxxnni28wnc"))))
99 (build-system cargo-build-system)
100 (arguments
101 `(#:cargo-inputs
102 (("rust-ansi-colours" ,rust-ansi-colours-1)
103 ("rust-ansi-term" ,rust-ansi-term-0.12)
104 ("rust-atty" ,rust-atty-0.2)
105 ("rust-bugreport" ,rust-bugreport-0.4)
106 ("rust-clap" ,rust-clap-2)
107 ("rust-clap" ,rust-clap-2)
108 ("rust-clircle" ,rust-clircle-0.3)
109 ("rust-console" ,rust-console-0.14)
110 ("rust-content-inspector" ,rust-content-inspector-0.2)
111 ("rust-dirs-next" ,rust-dirs-next-2)
112 ("rust-encoding" ,rust-encoding-0.2)
113 ("rust-error-chain" ,rust-error-chain-0.12)
114 ("rust-git2" ,rust-git2-0.13)
115 ("rust-globset" ,rust-globset-0.4)
116 ("rust-lazy-static" ,rust-lazy-static-1)
117 ("rust-path-abs" ,rust-path-abs-0.5)
118 ("rust-semver" ,rust-semver-0.11)
119 ("rust-serde" ,rust-serde-1)
120 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
121 ("rust-shell-words" ,rust-shell-words-1)
122 ("rust-syntect" ,rust-syntect-4)
123 ("rust-unicode-width" ,rust-unicode-width-0.1)
124 ("rust-wild" ,rust-wild-2))
125 #:cargo-development-inputs
126 (("rust-assert-cmd" ,rust-assert-cmd-1)
127 ("rust-nix" ,rust-nix-0.20)
128 ("rust-predicates" ,rust-predicates-1)
129 ("rust-serial-test" ,rust-serial-test-0.5)
130 ("rust-tempfile" ,rust-tempfile-3)
131 ("rust-wait-timeout" ,rust-wait-timeout-0.2))))
132 (native-inputs
133 `(("pkg-config" ,pkg-config)))
134 (inputs
135 `(("libgit2" ,libgit2)
136 ("zlib" ,zlib)))
137 (home-page "https://github.com/sharkdp/bat")
138 (synopsis "@command{cat} clone with syntax highlighting and git integration")
139 (description
140 "@command{bat} is a drop-in @command{cat} replacement featuring syntax
141 highlighting for a large number of languages, git integration, and automatic
142 paging.")
143 (license (list license:expat license:asl2.0))))
144
145 (define-public drill
146 (package
147 (name "drill")
148 (version "0.7.1")
149 (source
150 (origin
151 (method url-fetch)
152 (uri (crate-uri "drill" version))
153 (file-name (string-append name "-" version ".tar.gz"))
154 (sha256
155 (base32 "1m73d7rzi0p5c1hn0081d2235kcyapdza7h0vqf5jhnirpnjn793"))))
156 (build-system cargo-build-system)
157 (arguments
158 `(#:cargo-inputs
159 (("rust-async-trait" ,rust-async-trait-0.1)
160 ("rust-clap" ,rust-clap-2)
161 ("rust-colored" ,rust-colored-1)
162 ("rust-csv" ,rust-csv-1)
163 ("rust-futures" ,rust-futures-0.3)
164 ("rust-lazy-static" ,rust-lazy-static-1)
165 ("rust-linked-hash-map" ,rust-linked-hash-map-0.5)
166 ("rust-num-cpus" ,rust-num-cpus-1)
167 ("rust-rand" ,rust-rand-0.7)
168 ("rust-regex" ,rust-regex-1)
169 ("rust-reqwest" ,rust-reqwest-0.10)
170 ("rust-serde" ,rust-serde-1)
171 ("rust-serde-json" ,rust-serde-json-1)
172 ("rust-tokio" ,rust-tokio-0.2)
173 ("rust-url" ,rust-url-2)
174 ("rust-yaml-rust" ,rust-yaml-rust-0.4))))
175 (native-inputs
176 `(("pkg-config" ,pkg-config)))
177 (inputs
178 `(("openssl" ,openssl)))
179 (home-page "https://github.com/fcsonline/drill")
180 (synopsis "HTTP load testing application")
181 (description
182 "Drill is a HTTP load testing application written in Rust inspired by
183 Ansible syntax. Benchmark files can be written in YAML.")
184 (license license:gpl3)))
185
186 (define-public exa
187 (package
188 (name "exa")
189 (version "0.9.0")
190 (source
191 (origin
192 (method url-fetch)
193 (uri (crate-uri "exa" version))
194 (file-name
195 (string-append name "-" version ".tar.gz"))
196 (sha256
197 (base32
198 "1s902xgplz1167k0r7x235p914lprpsqy2if0kpa1mlb0fswqqq4"))))
199 (build-system cargo-build-system)
200 (arguments
201 `(#:cargo-inputs
202 (("rust-ansi-term" ,rust-ansi-term-0.12)
203 ("rust-datetime" ,rust-datetime-0.4)
204 ("rust-env-logger" ,rust-env-logger-0.6)
205 ("rust-git2" ,rust-git2-0.9)
206 ("rust-glob" ,rust-glob-0.3)
207 ("rust-lazy-static" ,rust-lazy-static-1)
208 ("rust-libc" ,rust-libc-0.2)
209 ("rust-locale" ,rust-locale-0.2)
210 ("rust-log" ,rust-log-0.4)
211 ("rust-natord" ,rust-natord-1)
212 ("rust-num-cpus" ,rust-num-cpus-1)
213 ("rust-number-prefix" ,rust-number-prefix-0.3)
214 ("rust-scoped-threadpool" ,rust-scoped-threadpool-0.1)
215 ("rust-term-grid" ,rust-term-grid-0.1)
216 ("rust-term-size" ,rust-term-size-0.3)
217 ("rust-unicode-width" ,rust-unicode-width-0.1)
218 ("rust-users" ,rust-users-0.9)
219 ("rust-zoneinfo-compiled" ,rust-zoneinfo-compiled-0.4))
220 #:cargo-development-inputs
221 (("rust-datetime" ,rust-datetime-0.4))
222 #:phases
223 (modify-phases %standard-phases
224 ;; Ignoring failing tests.
225 ;; Reported in https://github.com/ogham/exa/issues/318
226 (add-before 'check 'disable-failing-tests
227 (lambda _
228 (substitute* "src/options/mod.rs"
229 (("^.*fn oneline_across.*" oneline-across)
230 (string-append "#[ignore]\n" oneline-across)))
231
232 (substitute* "src/options/view.rs"
233 (("test!\\(across:.*") "")
234 (("test!\\(cr:.*") "")
235 (("test!\\(empty:.*") "")
236 (("test!\\(gracross:.*") "")
237 (("test!\\(grid:.*") "")
238 (("test!\\(icons:.*") "")
239 (("test!\\(just_binary:.*") "")
240 (("test!\\(just_blocks:.*") "")
241 (("test!\\(just_bytes:.*") "")
242 (("test!\\(just_git:.*") "")
243 (("test!\\(just_group:.*") "")
244 (("test!\\(just_header:.*") "")
245 (("test!\\(just_inode:.*") "")
246 (("test!\\(just_links:.*") "")
247 (("test!\\(leg:.*") "")
248 (("test!\\(lid:.*") "")
249 (("test!\\(original_g:.*") ""))
250 #t))
251 (add-after 'install 'install-extras
252 (lambda* (#:key outputs #:allow-other-keys)
253 (let* ((out (assoc-ref outputs "out"))
254 (share (string-append out "/share"))
255 (man1 (string-append share "/man/man1")))
256 (install-file "contrib/man/exa.1" man1)
257 (mkdir-p (string-append out "/etc/bash_completion.d"))
258 (mkdir-p (string-append share "/fish/vendor_completions.d"))
259 (mkdir-p (string-append share "/zsh/site-functions"))
260 (copy-file "contrib/completions.bash"
261 (string-append out "/etc/bash_completion.d/exa"))
262 (copy-file "contrib/completions.fish"
263 (string-append share "/fish/vendor_completions.d/exa.fish"))
264 (copy-file "contrib/completions.zsh"
265 (string-append share "/zsh/site-functions/_exa"))
266 #t))))))
267 (inputs
268 `(("libgit2" ,libgit2)
269 ("zlib" ,zlib)))
270 (native-inputs
271 `(("pkg-config" ,pkg-config)))
272 (home-page "https://the.exa.website/")
273 (synopsis "Modern replacement for ls")
274 (description "@code{exa} is a modern replacement for the command-line
275 program @code{ls}. It uses colours to distinguish file types and metadata. It
276 also knows about symlinks, extended attributes, and Git.")
277 (license license:expat)))
278
279 (define-public fd
280 (package
281 (name "fd")
282 (version "8.1.1")
283 (source
284 (origin
285 (method url-fetch)
286 (uri (crate-uri "fd-find" version))
287 (file-name
288 (string-append name "-" version ".tar.gz"))
289 (sha256
290 (base32
291 "124a5r8hpk2phs1288jybh34d48yxy44wr7gv5ggchs272gs2jam"))))
292 (build-system cargo-build-system)
293 (arguments
294 `(#:cargo-inputs
295 (("rust-ansi-term" ,rust-ansi-term-0.12)
296 ("rust-anyhow" ,rust-anyhow-1)
297 ("rust-atty" ,rust-atty-0.2)
298 ("rust-clap" ,rust-clap-2)
299 ("rust-ctrlc" ,rust-ctrlc-3)
300 ("rust-dirs" ,rust-dirs-2)
301 ("rust-globset" ,rust-globset-0.4)
302 ("rust-humantime" ,rust-humantime-2)
303 ("rust-ignore" ,rust-ignore-0.4)
304 ("rust-jemallocator" ,rust-jemallocator-0.3)
305 ("rust-lazy-static" ,rust-lazy-static-1)
306 ("rust-libc" ,rust-libc-0.2)
307 ("rust-lscolors" ,rust-lscolors-0.7)
308 ("rust-num-cpus" ,rust-num-cpus-1)
309 ("rust-regex" ,rust-regex-1)
310 ("rust-regex-syntax" ,rust-regex-syntax-0.6)
311 ("rust-users" ,rust-users-0.10)
312 ("rust-version-check" ,rust-version-check-0.9))
313 #:cargo-development-inputs
314 (("rust-diff" ,rust-diff-0.1)
315 ("rust-filetime" ,rust-filetime-0.2)
316 ("rust-tempdir" ,rust-tempdir-0.3))
317 #:phases
318 (modify-phases %standard-phases
319 (add-after 'unpack 'override-jemalloc
320 (lambda* (#:key inputs #:allow-other-keys)
321 (let ((jemalloc (assoc-ref inputs "jemalloc")))
322 (setenv "JEMALLOC_OVERRIDE"
323 (string-append jemalloc "/lib/libjemalloc.so")))
324 #t))
325 (add-after 'install 'install-extra
326 (lambda* (#:key outputs #:allow-other-keys)
327 (let* ((out (assoc-ref outputs "out"))
328 (install-completion
329 (lambda (completion out-dir)
330 (for-each
331 (lambda (f)
332 (install-file f (string-append out out-dir)))
333 (find-files "target/release/build/" completion)))))
334 ;; Manpages
335 (install-file "doc/fd.1" (string-append out "/share/man/man1"))
336 ;; Completions
337 (install-completion "^fd.bash$" "/etc/bash_completion.d")
338 (install-completion "^fd.fish$" "/share/fish/vendor_completions.d")
339 (install-completion "^_fd$" "/share/zsh/site-functions")
340 (rename-file (string-append out "/etc/bash_completion.d/fd.bash")
341 (string-append out "/etc/bash_completion.d/fd"))
342 #t))))))
343 (inputs `(("jemalloc" ,jemalloc)))
344 (home-page "https://github.com/sharkdp/fd")
345 (synopsis "Simple, fast and user-friendly alternative to find")
346 (description
347 "@code{fd} is a simple, fast and user-friendly alternative to @code{find}.
348 While it does not seek to mirror all of find's powerful functionality, it
349 provides defaults for 80% of the use cases.")
350 (license (list license:expat license:asl2.0))))
351
352 (define-public hexyl
353 (package
354 (name "hexyl")
355 (version "0.8.0")
356 (source
357 (origin
358 (method url-fetch)
359 (uri (crate-uri "hexyl" version))
360 (file-name
361 (string-append name "-" version ".tar.gz"))
362 (sha256
363 (base32
364 "0sipag77196467idbznbk5q5lwhqz85zw7y1pwg9b27jxqyk04rp"))))
365 (build-system cargo-build-system)
366 (arguments
367 `(#:cargo-inputs
368 (("rust-ansi-term" ,rust-ansi-term-0.12)
369 ("rust-atty" ,rust-atty-0.2)
370 ("rust-clap" ,rust-clap-2)
371 ("rust-libc" ,rust-libc-0.2))))
372 (home-page "https://github.com/sharkdp/hexyl")
373 (synopsis "Command-line hex viewer")
374 (description
375 "This package provides a command line hex viewer. It uses a colored output
376 for distinguishing different kinds of bytes such as NULL bytes, printable ASCII
377 characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
378 (license (list license:expat license:asl2.0))))
379
380 (define-public ripgrep
381 (package
382 (name "ripgrep")
383 (version "13.0.0")
384 (source
385 (origin
386 (method url-fetch)
387 (uri (crate-uri "ripgrep" version))
388 (file-name
389 (string-append name "-" version ".tar.gz"))
390 (sha256
391 (base32
392 "1gv4imhjgxmyxaa996yshcjlakmrjw9pf4rycp90pq675cn9sz7k"))))
393 (build-system cargo-build-system)
394 (arguments
395 `(#:cargo-inputs
396 (("rust-bstr" ,rust-bstr-0.2)
397 ("rust-clap" ,rust-clap-2)
398 ("rust-grep" ,rust-grep-0.2)
399 ("rust-ignore" ,rust-ignore-0.4)
400 ("rust-jemallocator" ,rust-jemallocator-0.3)
401 ("rust-lazy-static" ,rust-lazy-static-1)
402 ("rust-log" ,rust-log-0.4)
403 ("rust-num-cpus" ,rust-num-cpus-1)
404 ("rust-regex" ,rust-regex-1)
405 ("rust-serde-json" ,rust-serde-json-1)
406 ("rust-termcolor" ,rust-termcolor-1))
407 #:cargo-development-inputs
408 (("rust-serde" ,rust-serde-1)
409 ("rust-serde-derive" ,rust-serde-derive-1)
410 ("rust-walkdir" ,rust-walkdir-2))
411 #:modules ((ice-9 match)
412 (guix build cargo-build-system)
413 (guix build utils))
414 #:phases
415 (modify-phases %standard-phases
416 (add-after 'build 'install-manpage
417 ;; NOTE: This is done before 'check so that there's only one output
418 ;; directory with the man page.
419 (lambda* (#:key outputs #:allow-other-keys)
420 (match (find-files "target" "^rg\\.1$")
421 ((manpage)
422 (install-file manpage (string-append
423 (assoc-ref outputs "out")
424 "/share/man/man1"))))
425 #t)))
426 #:features '("pcre2")))
427 (native-inputs
428 `(("asciidoc" ,asciidoc)
429 ("pcre2" ,pcre2)
430 ("pkg-config" ,pkg-config)))
431 (home-page "https://github.com/BurntSushi/ripgrep")
432 (synopsis "Line-oriented search tool")
433 (description
434 "ripgrep is a line-oriented search tool that recursively searches
435 your current directory for a regex pattern while respecting your
436 gitignore rules.")
437 (license (list license:unlicense license:expat))))
438
439 (define-public rust-cbindgen
440 (package
441 (name "rust-cbindgen")
442 (version "0.13.2")
443 (source
444 (origin
445 (method url-fetch)
446 (uri (crate-uri "cbindgen" version))
447 (file-name (string-append name "-" version ".crate"))
448 (sha256
449 (base32
450 "0673pq96hs7waavkv58v2pakpxpsfyjvbraa5kyl2b44phgdzcid"))))
451 (build-system cargo-build-system)
452 (arguments
453 `(#:cargo-inputs
454 (("clap" ,rust-clap-2)
455 ("log" ,rust-log-0.4)
456 ("proc-macro2" ,rust-proc-macro2-1)
457 ("quote" ,rust-quote-1)
458 ("serde" ,rust-serde-1)
459 ("serde-json" ,rust-serde-json-1)
460 ("syn" ,rust-syn-1)
461 ("tempfile" ,rust-tempfile-3)
462 ("toml" ,rust-toml-0.5))))
463 (home-page "https://github.com/eqrion/cbindgen/")
464 (synopsis "Tool for generating C bindings to Rust code")
465 (description
466 "This package provides a tool for generating C/C++ bindings to Rust code.")
467 (license license:mpl2.0)))
468
469 (define-public rust-cbindgen-0.19
470 (package
471 (inherit rust-cbindgen)
472 (name "rust-cbindgen")
473 (version "0.19.0")
474 (source
475 (origin
476 (method url-fetch)
477 (uri (crate-uri "cbindgen" version))
478 (file-name
479 (string-append name "-" version ".tar.gz"))
480 (sha256
481 (base32
482 "1yld9fni9g9mzg4r42zfk79aq9mzm2sfzzjrrx4vir4lp4qqqwiq"))))
483 (arguments
484 `(#:cargo-inputs
485 (("rust-clap" ,rust-clap-2)
486 ("rust-heck" ,rust-heck-0.3)
487 ("rust-indexmap" ,rust-indexmap-1)
488 ("rust-log" ,rust-log-0.4)
489 ("rust-proc-macro2" ,rust-proc-macro2-1)
490 ("rust-quote" ,rust-quote-1)
491 ("rust-serde" ,rust-serde-1)
492 ("rust-serde-json" ,rust-serde-json-1)
493 ("rust-syn" ,rust-syn-1)
494 ("rust-tempfile" ,rust-tempfile-3)
495 ("rust-toml" ,rust-toml-0.5))
496 #:cargo-development-inputs
497 (("rust-serial-test" ,rust-serial-test-0.5))))
498 (native-inputs
499 `(("python-cython" ,python-cython)))))
500
501 (define-public rust-cbindgen-0.16
502 (package
503 (inherit rust-cbindgen)
504 (name "rust-cbindgen")
505 (version "0.16.0")
506 (source
507 (origin
508 (method url-fetch)
509 (uri (crate-uri "cbindgen" version))
510 (file-name (string-append name "-" version ".tar.gz"))
511 (sha256
512 (base32 "049cai626nzw0km03parx4sxwaxgbr7i5ifjbjwnfxkqkj5k2i4k"))))
513 (arguments
514 `(#:tests? #false ;missing files
515 #:cargo-inputs
516 (("rust-clap" ,rust-clap-2)
517 ("rust-heck" ,rust-heck-0.3)
518 ("rust-indexmap" ,rust-indexmap-1)
519 ("rust-log" ,rust-log-0.4)
520 ("rust-proc-macro2" ,rust-proc-macro2-1)
521 ("rust-quote" ,rust-quote-1)
522 ("rust-serde" ,rust-serde-1)
523 ("rust-serde-json" ,rust-serde-json-1)
524 ("rust-syn" ,rust-syn-1)
525 ("rust-tempfile" ,rust-tempfile-3)
526 ("rust-toml" ,rust-toml-0.5))
527 #:cargo-development-inputs
528 (("rust-serial-test" ,rust-serial-test-0.5))))))
529
530 (define-public rust-cbindgen-0.15
531 (package
532 (inherit rust-cbindgen)
533 (name "rust-cbindgen")
534 (version "0.15.0")
535 (source
536 (origin
537 (method url-fetch)
538 (uri (crate-uri "cbindgen" version))
539 (file-name (string-append name "-" version ".tar.gz"))
540 (sha256
541 (base32 "0dgf49zij9rxnf0lv4k5gcmx1mxcz16czkk6q63anz0xp8ds3xhx"))))
542 (arguments
543 `(#:tests? #false ;missing files
544 #:cargo-inputs
545 (("rust-clap" ,rust-clap-2)
546 ("rust-heck" ,rust-heck-0.3)
547 ("rust-indexmap" ,rust-indexmap-1)
548 ("rust-log" ,rust-log-0.4)
549 ("rust-proc-macro2" ,rust-proc-macro2-1)
550 ("rust-quote" ,rust-quote-1)
551 ("rust-serde" ,rust-serde-1)
552 ("rust-serde-json" ,rust-serde-json-1)
553 ("rust-syn" ,rust-syn-1)
554 ("rust-tempfile" ,rust-tempfile-3)
555 ("rust-toml" ,rust-toml-0.5))))))
556
557 (define-public rust-cbindgen-0.14
558 (package
559 (inherit rust-cbindgen)
560 (name "rust-cbindgen")
561 (version "0.14.1")
562 (source
563 (origin
564 (method url-fetch)
565 (uri (crate-uri "cbindgen" version))
566 (file-name
567 (string-append name "-" version ".tar.gz"))
568 (sha256
569 (base32
570 "1ppwqbzydxlg9a24lynzfk60xrvqw4k31mpz1wrk6lbf88zf8nxi"))))))
571
572 (define-public rust-cbindgen-0.12
573 (package
574 (inherit rust-cbindgen)
575 (name "rust-cbindgen")
576 (version "0.12.2")
577 (source
578 (origin
579 (method url-fetch)
580 (uri (crate-uri "cbindgen" version))
581 (file-name
582 (string-append name "-" version ".tar.gz"))
583 (sha256
584 (base32
585 "13jzbmjz1bmmfr0i80hw6ar484mgabx3hbpb2ynhk0ddqi0yr58m"))))))
586
587 (define-public tectonic
588 (package
589 (name "tectonic")
590 (version "0.7.0")
591 (source
592 (origin
593 (method url-fetch)
594 (uri (crate-uri "tectonic" version))
595 (file-name (string-append name "-" version ".tar.gz"))
596 (sha256
597 (base32 "1x6i97dl28y6wxpq2r4dcsa853sa4yw5vhl79qdb44q5wsd6ba1f"))))
598 (build-system cargo-build-system)
599 (arguments
600 `(#:rust ,rust-1.52
601 #:cargo-build-flags '("--release" "--features" "external-harfbuzz")
602 #:cargo-inputs
603 (("rust-atty" ,rust-atty-0.2)
604 ("rust-byte-unit" ,rust-byte-unit-4)
605 ("rust-cfg-if" ,rust-cfg-if-1)
606 ("rust-error-chain" ,rust-error-chain-0.12)
607 ("rust-flate2" ,rust-flate2-1)
608 ("rust-fs2" ,rust-fs2-0.4)
609 ("rust-lazy-static" ,rust-lazy-static-1)
610 ("rust-libc" ,rust-libc-0.2)
611 ("rust-md-5" ,rust-md-5-0.9)
612 ("rust-open" ,rust-open-1)
613 ("rust-serde" ,rust-serde-1)
614 ("rust-sha2" ,rust-sha2-0.9)
615 ("rust-structopt" ,rust-structopt-0.3)
616 ("rust-tectonic-bridge-core" ,rust-tectonic-bridge-core-0.2)
617 ("rust-tectonic-bundles" ,rust-tectonic-bundles-0.1)
618 ("rust-tectonic-docmodel" ,rust-tectonic-docmodel-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.3)
625 ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.2)
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-analyzer
762 (package
763 (name "rust-analyzer")
764 (version "2021-06-07")
765 (source
766 (origin
767 ;; The crate at "crates.io" is empty.
768 (method git-fetch)
769 (uri (git-reference
770 (url "https://github.com/rust-analyzer/rust-analyzer")
771 (commit version)))
772 (file-name (git-file-name name version))
773 (sha256
774 (base32
775 "06bc3s5kjwpyr2cq79p0306a9bqp3xp928d750ybby9npq2dvj3z"))))
776 (build-system cargo-build-system)
777 (arguments
778 `(#:rust ,rust-1.52
779 #:install-source? #f ; virtual manifest
780 #:cargo-test-flags
781 '("--release" "--"
782 "--skip=tests::test_version_check" ;; It need rustc's version
783 ;; FIXME: Guix's rust not install source in %out/lib/rustlib/src/rust
784 ;; so "can't load standard library from sysroot"
785 "--skip=tests::test_loading_rust_analyzer"
786 "--skip=tidy::cargo_files_are_tidy" ;; Not need
787 "--skip=tidy::check_licenses" ;; It run cargo metadata.
788 "--skip=tidy::check_merge_commits" ;; It run git rev-list.
789 "--skip=tidy::check_code_formatting" ;; Need rustfmt as cargo fmt
790 "--skip=tidy::generate_grammar" ;; Same
791 "--skip=tidy::generate_assists_tests") ;; Same
792 #:cargo-inputs
793 (("rust-always-assert" ,rust-always-assert-0.1)
794 ("rust-anyhow" ,rust-anyhow-1)
795 ("rust-anymap" ,rust-anymap-0.12)
796 ("rust-arrayvec" ,rust-arrayvec-0.7)
797 ("rust-backtrace" ,rust-backtrace-0.3)
798 ("rust-cargo-metadata" ,rust-cargo-metadata-0.13)
799 ("rust-cfg-if" ,rust-cfg-if-1)
800 ("rust-chalk-ir" ,rust-chalk-ir-0.68)
801 ("rust-chalk-recursive" ,rust-chalk-recursive-0.68)
802 ("rust-chalk-solve" ,rust-chalk-solve-0.68)
803 ("rust-countme" ,rust-countme-2)
804 ("rust-cov-mark" ,rust-cov-mark-1)
805 ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
806 ("rust-dashmap" ,rust-dashmap-4)
807 ("rust-dissimilar" ,rust-dissimilar-1)
808 ("rust-dot" ,rust-dot-0.1)
809 ("rust-drop-bomb" ,rust-drop-bomb-0.1)
810 ("rust-either" ,rust-either-1)
811 ("rust-ena" ,rust-ena-0.14)
812 ("rust-env-logger" ,rust-env-logger-0.8)
813 ("rust-expect-test" ,rust-expect-test-1)
814 ("rust-flate2" ,rust-flate2-1)
815 ("rust-fst" ,rust-fst-0.4)
816 ("rust-home" ,rust-home-0.5)
817 ("rust-indexmap" ,rust-indexmap-1)
818 ("rust-itertools" ,rust-itertools-0.10)
819 ("rust-jod-thread" ,rust-jod-thread-0.1)
820 ("rust-libc" ,rust-libc-0.2)
821 ("rust-libloading" ,rust-libloading-0.7)
822 ("rust-log" ,rust-log-0.4)
823 ("rust-lsp-server" ,rust-lsp-server-0.5)
824 ("rust-lsp-types" ,rust-lsp-types-0.89)
825 ("rust-memmap2" ,rust-memmap2-0.2)
826 ("rust-mimalloc" ,rust-mimalloc-0.1)
827 ("rust-miow" ,rust-miow-0.3)
828 ("rust-notify" ,rust-notify-5)
829 ("rust-object" ,rust-object-0.24)
830 ("rust-once-cell" ,rust-once-cell-1)
831 ("rust-oorandom" ,rust-oorandom-11.1)
832 ("rust-parking-lot" ,rust-parking-lot-0.11)
833 ("rust-perf-event" ,rust-perf-event-0.4)
834 ("rust-proc-macro2" ,rust-proc-macro2-1)
835 ("rust-pulldown-cmark" ,rust-pulldown-cmark-0.8)
836 ("rust-pulldown-cmark-to-cmark" ,rust-pulldown-cmark-to-cmark-6)
837 ("rust-quote" ,rust-quote-1)
838 ("rust-rayon" ,rust-rayon-1)
839 ("rust-rowan" ,rust-rowan-0.13)
840 ("rust-rustc-ap-rustc-lexer" ,rust-rustc-ap-rustc-lexer-721)
841 ("rust-rustc-hash" ,rust-rustc-hash-1)
842 ("rust-salsa" ,rust-salsa-0.17)
843 ("rust-scoped-tls" ,rust-scoped-tls-1)
844 ("rust-serde" ,rust-serde-1)
845 ("rust-serde-json" ,rust-serde-json-1)
846 ("rust-serde-path-to-error" ,rust-serde-path-to-error-0.1)
847 ("rust-smallvec" ,rust-smallvec-1)
848 ("rust-smol-str" ,rust-smol-str-0.1)
849 ("rust-snap" ,rust-snap-1)
850 ("rust-text-size" ,rust-text-size-1)
851 ("rust-threadpool" ,rust-threadpool-1)
852 ("rust-tikv-jemalloc-ctl" ,rust-tikv-jemalloc-ctl-0.4)
853 ("rust-tikv-jemallocator" ,rust-tikv-jemallocator-0.4)
854 ("rust-tracing" ,rust-tracing-0.1)
855 ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.2)
856 ("rust-tracing-tree" ,rust-tracing-tree-0.1)
857 ("rust-ungrammar" ,rust-ungrammar-1)
858 ("rust-url" ,rust-url-2)
859 ("rust-walkdir" ,rust-walkdir-2)
860 ("rust-winapi" ,rust-winapi-0.3)
861 ("rust-write-json" ,rust-write-json-0.1)
862 ("rust-xflags" ,rust-xflags-0.2)
863 ("rust-xshell" ,rust-xshell-0.1))
864 #:phases
865 (modify-phases %standard-phases
866 (add-after 'unpack 'patch-build-failures
867 (lambda _
868 (chmod ".cargo/config" 420)
869 #t))
870 (add-before 'check 'fix-tests
871 (lambda* (#:key inputs #:allow-other-keys)
872 (let ((bash (string-append "#!" (which "bash"))))
873 (with-directory-excursion "crates/syntax/test_data/lexer/ok"
874 (substitute* "0010_single_line_comments.txt"
875 (("SHEBANG 19")
876 (string-append "SHEBANG "
877 (number->string (string-length bash))))
878 (("#!/usr/bin/env bash") bash))))))
879 (replace 'install
880 (lambda* (#:key outputs #:allow-other-keys)
881 (install-file "target/release/rust-analyzer"
882 (string-append (assoc-ref outputs "out")
883 "/bin")))))))
884 (home-page "https://rust-analyzer.github.io/")
885 (synopsis "Experimental Rust compiler front-end for IDEs")
886 (description "Rust-analyzer is a modular compiler frontend for the Rust
887 language. It is a part of a larger rls-2.0 effort to create excellent IDE
888 support for Rust.")
889 (license (list license:expat license:asl2.0))))
890
891 (define-public rust-cargo-c
892 (package
893 (name "rust-cargo-c")
894 (version "0.8.1+cargo-0.53")
895 (source
896 (origin
897 (method url-fetch)
898 (uri (crate-uri "cargo-c" version))
899 (file-name
900 (string-append name "-" version ".tar.gz"))
901 (sha256
902 (base32
903 "0fwdxhdj2963xr6xfqr56i7hikhsdv562vgxq2dj3h2mi3dil1k6"))))
904 (build-system cargo-build-system)
905 (arguments
906 `(#:rust ,rust-1.52 ;inherited from rust-cargo
907 #:cargo-inputs
908 (("rust-cbindgen" ,rust-cbindgen-0.19)
909 ("rust-cargo" ,rust-cargo-0.53) ;
910 ("rust-anyhow" ,rust-anyhow-1)
911 ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.4)
912 ("rust-structopt" ,rust-structopt-0.3)
913 ("rust-log" ,rust-log-0.4)
914 ("rust-toml" ,rust-toml-0.5)
915 ("rust-cargo-metadata" ,rust-cargo-metadata-0.9)
916 ("rust-semver" ,rust-semver-0.10)
917 ("rust-serde" ,rust-serde-1)
918 ("rust-serde-derive" ,rust-serde-derive-1)
919 ("rust-serde-json" ,rust-serde-json-1)
920 ("rust-regex" ,rust-regex-1))))
921 (native-inputs
922 `(("pkg-config" ,pkg-config)))
923 (inputs
924 `(("curl" ,curl)
925 ("libssh2" ,libssh2)
926 ("openssl" ,openssl)
927 ("zlib" ,zlib)))
928 (home-page "https://github.com/lu-zero/cargo-c")
929 (synopsis "Build and install C-compatible libraries")
930 (description
931 "This package produces and installs a correct pkg-config file, a static
932 library and a dynamic library, and a C header to be used by any C (and
933 C-compatible) software.")
934 (license license:expat)))
935
936 (define-public zoxide
937 (package
938 (name "zoxide")
939 (version "0.6.0")
940 (source
941 (origin
942 (method url-fetch)
943 (uri (crate-uri "zoxide" version))
944 (file-name (string-append name "-" version ".tar.gz"))
945 (sha256
946 (base32 "1ih01l3xp8plicxhmyxjkq12ncpdb8954jcj3dh3lwvkhvw29nkk"))))
947 (build-system cargo-build-system)
948 (arguments
949 `(#:cargo-inputs
950 (("rust-anyhow" ,rust-anyhow-1)
951 ("rust-askama" ,rust-askama-0.10)
952 ("rust-bincode" ,rust-bincode-1)
953 ("rust-clap" ,rust-clap-3)
954 ("rust-dirs-next" ,rust-dirs-next-2)
955 ("rust-dunce" ,rust-dunce-1)
956 ("rust-glob" ,rust-glob-0.3)
957 ("rust-once-cell" ,rust-once-cell-1)
958 ("rust-ordered-float" ,rust-ordered-float-2)
959 ("rust-rand" ,rust-rand-0.7)
960 ("rust-serde" ,rust-serde-1)
961 ("rust-tempfile" ,rust-tempfile-3))
962 #:cargo-development-inputs
963 (("rust-assert-cmd" ,rust-assert-cmd-1)
964 ("rust-seq-macro" ,rust-seq-macro-0.2))))
965 (home-page "https://github.com/ajeetdsouza/zoxide/")
966 (synopsis "Fast way to navigate your file system")
967 (description
968 "Zoxide is a fast replacement for your @command{cd} command. It keeps
969 track of the directories you use most frequently, and uses a ranking algorithm
970 to navigate to the best match.")
971 (license license:expat)))