rust-apps.scm 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089
  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. (define-module (gnu packages rust-apps)
  31. #:use-module ((guix licenses) #:prefix license:)
  32. #:use-module (guix build-system cargo)
  33. #:use-module (guix download)
  34. #:use-module (guix git-download)
  35. #:use-module (guix packages)
  36. #:use-module (gnu packages admin)
  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 linux)
  46. #:use-module (gnu packages ssh)
  47. #:use-module (gnu packages pcre)
  48. #:use-module (gnu packages pkg-config)
  49. #:use-module (gnu packages python-xyz)
  50. #:use-module (gnu packages rust)
  51. #:use-module (gnu packages tls)
  52. #:use-module (gnu packages version-control))
  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. (define-public bat
  88. (package
  89. (name "bat")
  90. (version "0.18.3")
  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 "0qlk032dd6zxda1v7clah33nafxygaw3x7f73ajwlvk956nrn1js"))))
  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-clircle" ,rust-clircle-0.3)
  107. ("rust-console" ,rust-console-0.14)
  108. ("rust-content-inspector" ,rust-content-inspector-0.2)
  109. ("rust-dirs-next" ,rust-dirs-next-2)
  110. ("rust-encoding" ,rust-encoding-0.2)
  111. ("rust-error-chain" ,rust-error-chain-0.12)
  112. ("rust-git2" ,rust-git2-0.13)
  113. ("rust-globset" ,rust-globset-0.4)
  114. ("rust-grep-cli" ,rust-grep-cli-0.1)
  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.21)
  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. (define-public drill
  144. (package
  145. (name "drill")
  146. (version "0.7.1")
  147. (source
  148. (origin
  149. (method url-fetch)
  150. (uri (crate-uri "drill" version))
  151. (file-name (string-append name "-" version ".tar.gz"))
  152. (sha256
  153. (base32 "1m73d7rzi0p5c1hn0081d2235kcyapdza7h0vqf5jhnirpnjn793"))))
  154. (build-system cargo-build-system)
  155. (arguments
  156. `(#:cargo-inputs
  157. (("rust-async-trait" ,rust-async-trait-0.1)
  158. ("rust-clap" ,rust-clap-2)
  159. ("rust-colored" ,rust-colored-1)
  160. ("rust-csv" ,rust-csv-1)
  161. ("rust-futures" ,rust-futures-0.3)
  162. ("rust-lazy-static" ,rust-lazy-static-1)
  163. ("rust-linked-hash-map" ,rust-linked-hash-map-0.5)
  164. ("rust-num-cpus" ,rust-num-cpus-1)
  165. ("rust-rand" ,rust-rand-0.7)
  166. ("rust-regex" ,rust-regex-1)
  167. ("rust-reqwest" ,rust-reqwest-0.10)
  168. ("rust-serde" ,rust-serde-1)
  169. ("rust-serde-json" ,rust-serde-json-1)
  170. ("rust-tokio" ,rust-tokio-0.2)
  171. ("rust-url" ,rust-url-2)
  172. ("rust-yaml-rust" ,rust-yaml-rust-0.4))))
  173. (native-inputs
  174. `(("pkg-config" ,pkg-config)))
  175. (inputs
  176. `(("openssl" ,openssl)))
  177. (home-page "https://github.com/fcsonline/drill")
  178. (synopsis "HTTP load testing application")
  179. (description
  180. "Drill is a HTTP load testing application written in Rust inspired by
  181. Ansible syntax. Benchmark files can be written in YAML.")
  182. (license license:gpl3)))
  183. (define-public exa
  184. (package
  185. (name "exa")
  186. (version "0.9.0")
  187. (source
  188. (origin
  189. (method url-fetch)
  190. (uri (crate-uri "exa" version))
  191. (file-name
  192. (string-append name "-" version ".tar.gz"))
  193. (sha256
  194. (base32
  195. "1s902xgplz1167k0r7x235p914lprpsqy2if0kpa1mlb0fswqqq4"))))
  196. (build-system cargo-build-system)
  197. (arguments
  198. `(#:cargo-inputs
  199. (("rust-ansi-term" ,rust-ansi-term-0.12)
  200. ("rust-datetime" ,rust-datetime-0.4)
  201. ("rust-env-logger" ,rust-env-logger-0.6)
  202. ("rust-git2" ,rust-git2-0.9)
  203. ("rust-glob" ,rust-glob-0.3)
  204. ("rust-lazy-static" ,rust-lazy-static-1)
  205. ("rust-libc" ,rust-libc-0.2)
  206. ("rust-locale" ,rust-locale-0.2)
  207. ("rust-log" ,rust-log-0.4)
  208. ("rust-natord" ,rust-natord-1)
  209. ("rust-num-cpus" ,rust-num-cpus-1)
  210. ("rust-number-prefix" ,rust-number-prefix-0.3)
  211. ("rust-scoped-threadpool" ,rust-scoped-threadpool-0.1)
  212. ("rust-term-grid" ,rust-term-grid-0.1)
  213. ("rust-term-size" ,rust-term-size-0.3)
  214. ("rust-unicode-width" ,rust-unicode-width-0.1)
  215. ("rust-users" ,rust-users-0.9)
  216. ("rust-zoneinfo-compiled" ,rust-zoneinfo-compiled-0.4))
  217. #:cargo-development-inputs
  218. (("rust-datetime" ,rust-datetime-0.4))
  219. #:phases
  220. (modify-phases %standard-phases
  221. ;; Ignoring failing tests.
  222. ;; Reported in https://github.com/ogham/exa/issues/318
  223. (add-before 'check 'disable-failing-tests
  224. (lambda _
  225. (substitute* "src/options/mod.rs"
  226. (("^.*fn oneline_across.*" oneline-across)
  227. (string-append "#[ignore]\n" oneline-across)))
  228. (substitute* "src/options/view.rs"
  229. (("test!\\(across:.*") "")
  230. (("test!\\(cr:.*") "")
  231. (("test!\\(empty:.*") "")
  232. (("test!\\(gracross:.*") "")
  233. (("test!\\(grid:.*") "")
  234. (("test!\\(icons:.*") "")
  235. (("test!\\(just_binary:.*") "")
  236. (("test!\\(just_blocks:.*") "")
  237. (("test!\\(just_bytes:.*") "")
  238. (("test!\\(just_git:.*") "")
  239. (("test!\\(just_group:.*") "")
  240. (("test!\\(just_header:.*") "")
  241. (("test!\\(just_inode:.*") "")
  242. (("test!\\(just_links:.*") "")
  243. (("test!\\(leg:.*") "")
  244. (("test!\\(lid:.*") "")
  245. (("test!\\(original_g:.*") ""))
  246. #t))
  247. (add-after 'install 'install-extras
  248. (lambda* (#:key outputs #:allow-other-keys)
  249. (let* ((out (assoc-ref outputs "out"))
  250. (share (string-append out "/share"))
  251. (man1 (string-append share "/man/man1")))
  252. (install-file "contrib/man/exa.1" man1)
  253. (mkdir-p (string-append out "/etc/bash_completion.d"))
  254. (mkdir-p (string-append share "/fish/vendor_completions.d"))
  255. (mkdir-p (string-append share "/zsh/site-functions"))
  256. (copy-file "contrib/completions.bash"
  257. (string-append out "/etc/bash_completion.d/exa"))
  258. (copy-file "contrib/completions.fish"
  259. (string-append share "/fish/vendor_completions.d/exa.fish"))
  260. (copy-file "contrib/completions.zsh"
  261. (string-append share "/zsh/site-functions/_exa"))
  262. #t))))))
  263. (inputs
  264. `(("libgit2" ,libgit2)
  265. ("zlib" ,zlib)))
  266. (native-inputs
  267. `(("pkg-config" ,pkg-config)))
  268. (home-page "https://the.exa.website/")
  269. (synopsis "Modern replacement for ls")
  270. (description "@code{exa} is a modern replacement for the command-line
  271. program @code{ls}. It uses colours to distinguish file types and metadata. It
  272. also knows about symlinks, extended attributes, and Git.")
  273. (license license:expat)))
  274. (define-public fd
  275. (package
  276. (name "fd")
  277. (version "8.1.1")
  278. (source
  279. (origin
  280. (method url-fetch)
  281. (uri (crate-uri "fd-find" version))
  282. (file-name
  283. (string-append name "-" version ".tar.gz"))
  284. (sha256
  285. (base32
  286. "124a5r8hpk2phs1288jybh34d48yxy44wr7gv5ggchs272gs2jam"))))
  287. (build-system cargo-build-system)
  288. (arguments
  289. `(#:cargo-inputs
  290. (("rust-ansi-term" ,rust-ansi-term-0.12)
  291. ("rust-anyhow" ,rust-anyhow-1)
  292. ("rust-atty" ,rust-atty-0.2)
  293. ("rust-clap" ,rust-clap-2)
  294. ("rust-ctrlc" ,rust-ctrlc-3)
  295. ("rust-dirs" ,rust-dirs-2)
  296. ("rust-globset" ,rust-globset-0.4)
  297. ("rust-humantime" ,rust-humantime-2)
  298. ("rust-ignore" ,rust-ignore-0.4)
  299. ("rust-jemallocator" ,rust-jemallocator-0.3)
  300. ("rust-lazy-static" ,rust-lazy-static-1)
  301. ("rust-libc" ,rust-libc-0.2)
  302. ("rust-lscolors" ,rust-lscolors-0.7)
  303. ("rust-num-cpus" ,rust-num-cpus-1)
  304. ("rust-regex" ,rust-regex-1)
  305. ("rust-regex-syntax" ,rust-regex-syntax-0.6)
  306. ("rust-users" ,rust-users-0.10)
  307. ("rust-version-check" ,rust-version-check-0.9))
  308. #:cargo-development-inputs
  309. (("rust-diff" ,rust-diff-0.1)
  310. ("rust-filetime" ,rust-filetime-0.2)
  311. ("rust-tempdir" ,rust-tempdir-0.3))
  312. #:phases
  313. (modify-phases %standard-phases
  314. (add-after 'unpack 'override-jemalloc
  315. (lambda* (#:key inputs #:allow-other-keys)
  316. (let ((jemalloc (assoc-ref inputs "jemalloc")))
  317. (setenv "JEMALLOC_OVERRIDE"
  318. (string-append jemalloc "/lib/libjemalloc.so")))
  319. #t))
  320. (add-after 'install 'install-extra
  321. (lambda* (#:key outputs #:allow-other-keys)
  322. (let* ((out (assoc-ref outputs "out"))
  323. (install-completion
  324. (lambda (completion out-dir)
  325. (for-each
  326. (lambda (f)
  327. (install-file f (string-append out out-dir)))
  328. (find-files "target/release/build/" completion)))))
  329. ;; Manpages
  330. (install-file "doc/fd.1" (string-append out "/share/man/man1"))
  331. ;; Completions
  332. (install-completion "^fd.bash$" "/etc/bash_completion.d")
  333. (install-completion "^fd.fish$" "/share/fish/vendor_completions.d")
  334. (install-completion "^_fd$" "/share/zsh/site-functions")
  335. (rename-file (string-append out "/etc/bash_completion.d/fd.bash")
  336. (string-append out "/etc/bash_completion.d/fd"))
  337. #t))))))
  338. (inputs `(("jemalloc" ,jemalloc)))
  339. (home-page "https://github.com/sharkdp/fd")
  340. (synopsis "Simple, fast and user-friendly alternative to find")
  341. (description
  342. "@code{fd} is a simple, fast and user-friendly alternative to @code{find}.
  343. While it does not seek to mirror all of find's powerful functionality, it
  344. provides defaults for 80% of the use cases.")
  345. (license (list license:expat license:asl2.0))))
  346. (define-public hexyl
  347. (package
  348. (name "hexyl")
  349. (version "0.8.0")
  350. (source
  351. (origin
  352. (method url-fetch)
  353. (uri (crate-uri "hexyl" version))
  354. (file-name
  355. (string-append name "-" version ".tar.gz"))
  356. (sha256
  357. (base32
  358. "0sipag77196467idbznbk5q5lwhqz85zw7y1pwg9b27jxqyk04rp"))))
  359. (build-system cargo-build-system)
  360. (arguments
  361. `(#:cargo-inputs
  362. (("rust-ansi-term" ,rust-ansi-term-0.12)
  363. ("rust-atty" ,rust-atty-0.2)
  364. ("rust-clap" ,rust-clap-2)
  365. ("rust-libc" ,rust-libc-0.2))))
  366. (home-page "https://github.com/sharkdp/hexyl")
  367. (synopsis "Command-line hex viewer")
  368. (description
  369. "This package provides a command line hex viewer. It uses a colored output
  370. for distinguishing different kinds of bytes such as NULL bytes, printable ASCII
  371. characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
  372. (license (list license:expat license:asl2.0))))
  373. (define-public hyperfine
  374. (package
  375. (name "hyperfine")
  376. (version "1.11.0")
  377. (source
  378. (origin
  379. (method url-fetch)
  380. (uri (crate-uri "hyperfine" version))
  381. (file-name
  382. (string-append name "-" version ".tar.gz"))
  383. (sha256
  384. (base32
  385. "0m5lrvx6wwkxqdc5digm1k4diiaqcg5j4pia77s5nw1aam7k51hy"))))
  386. (build-system cargo-build-system)
  387. (arguments
  388. `(#:modules ((guix build cargo-build-system)
  389. (guix build utils)
  390. (srfi srfi-26))
  391. #:cargo-inputs
  392. (("rust-atty" ,rust-atty-0.2)
  393. ("rust-cfg-if" ,rust-cfg-if-0.1)
  394. ("rust-clap" ,rust-clap-2)
  395. ("rust-colored" ,rust-colored-2)
  396. ("rust-csv" ,rust-csv-1)
  397. ("rust-indicatif" ,rust-indicatif-0.15)
  398. ("rust-libc" ,rust-libc-0.2)
  399. ("rust-rand" ,rust-rand-0.7)
  400. ("rust-rust-decimal" ,rust-rust-decimal-1)
  401. ("rust-serde" ,rust-serde-1)
  402. ("rust-serde-json" ,rust-serde-json-1)
  403. ("rust-statistical" ,rust-statistical-1)
  404. ("rust-version-check" ,rust-version-check-0.9)
  405. ("rust-winapi" ,rust-winapi-0.3))
  406. #:cargo-development-inputs
  407. (("rust-approx" ,rust-approx-0.3))
  408. #:phases
  409. (modify-phases %standard-phases
  410. (add-after 'install 'install-more
  411. (lambda* (#:key outputs #:allow-other-keys)
  412. (let* ((out (assoc-ref outputs "out"))
  413. (share (string-append out "/share/"))
  414. (man (string-append share "man/man1"))
  415. (bash (string-append share "bash-completion/completions"))
  416. (fish (string-append share "fish/vendor_completions.d"))
  417. (zsh (string-append share "zsh/site-functions")))
  418. (install-file "doc/hyperfine.1" man)
  419. (for-each (cut install-file <> bash)
  420. (find-files "target/release/build" "^hyperfine.bash$"))
  421. (rename-file (string-append bash "/hyperfine.bash")
  422. (string-append bash "/hyperfine"))
  423. (for-each (cut install-file <> fish)
  424. (find-files "target/release/build" "^hyperfine.fish$"))
  425. (for-each (cut install-file <> zsh)
  426. (find-files "target/release/build" "^_hyperfine$"))))))))
  427. (home-page "https://github.com/sharkdp/hyperfine")
  428. (synopsis "Command-line benchmarking tool")
  429. (description
  430. "This package provides a command-line benchmarking tool.")
  431. (license (list license:expat license:asl2.0))))
  432. (define-public ripgrep
  433. (package
  434. (name "ripgrep")
  435. (version "13.0.0")
  436. (source
  437. (origin
  438. (method url-fetch)
  439. (uri (crate-uri "ripgrep" version))
  440. (file-name
  441. (string-append name "-" version ".tar.gz"))
  442. (sha256
  443. (base32
  444. "1gv4imhjgxmyxaa996yshcjlakmrjw9pf4rycp90pq675cn9sz7k"))))
  445. (build-system cargo-build-system)
  446. (arguments
  447. `(#:cargo-inputs
  448. (("rust-bstr" ,rust-bstr-0.2)
  449. ("rust-clap" ,rust-clap-2)
  450. ("rust-grep" ,rust-grep-0.2)
  451. ("rust-ignore" ,rust-ignore-0.4)
  452. ("rust-jemallocator" ,rust-jemallocator-0.3)
  453. ("rust-lazy-static" ,rust-lazy-static-1)
  454. ("rust-log" ,rust-log-0.4)
  455. ("rust-num-cpus" ,rust-num-cpus-1)
  456. ("rust-regex" ,rust-regex-1)
  457. ("rust-serde-json" ,rust-serde-json-1)
  458. ("rust-termcolor" ,rust-termcolor-1))
  459. #:cargo-development-inputs
  460. (("rust-serde" ,rust-serde-1)
  461. ("rust-serde-derive" ,rust-serde-derive-1)
  462. ("rust-walkdir" ,rust-walkdir-2))
  463. #:modules ((ice-9 match)
  464. (guix build cargo-build-system)
  465. (guix build utils))
  466. #:phases
  467. (modify-phases %standard-phases
  468. (add-after 'build 'install-manpage
  469. ;; NOTE: This is done before 'check so that there's only one output
  470. ;; directory with the man page.
  471. (lambda* (#:key outputs #:allow-other-keys)
  472. (match (find-files "target" "^rg\\.1$")
  473. ((manpage)
  474. (install-file manpage (string-append
  475. (assoc-ref outputs "out")
  476. "/share/man/man1"))))
  477. #t)))
  478. #:features '("pcre2")))
  479. (native-inputs
  480. `(("asciidoc" ,asciidoc)
  481. ("pcre2" ,pcre2)
  482. ("pkg-config" ,pkg-config)))
  483. (home-page "https://github.com/BurntSushi/ripgrep")
  484. (synopsis "Line-oriented search tool")
  485. (description
  486. "ripgrep is a line-oriented search tool that recursively searches
  487. your current directory for a regex pattern while respecting your
  488. gitignore rules.")
  489. (license (list license:unlicense license:expat))))
  490. (define-public rust-cbindgen
  491. (package
  492. (name "rust-cbindgen")
  493. (version "0.13.2")
  494. (source
  495. (origin
  496. (method url-fetch)
  497. (uri (crate-uri "cbindgen" version))
  498. (file-name (string-append name "-" version ".crate"))
  499. (sha256
  500. (base32
  501. "0673pq96hs7waavkv58v2pakpxpsfyjvbraa5kyl2b44phgdzcid"))))
  502. (build-system cargo-build-system)
  503. (arguments
  504. `(#:cargo-inputs
  505. (("clap" ,rust-clap-2)
  506. ("log" ,rust-log-0.4)
  507. ("proc-macro2" ,rust-proc-macro2-1)
  508. ("quote" ,rust-quote-1)
  509. ("serde" ,rust-serde-1)
  510. ("serde-json" ,rust-serde-json-1)
  511. ("syn" ,rust-syn-1)
  512. ("tempfile" ,rust-tempfile-3)
  513. ("toml" ,rust-toml-0.5))))
  514. (home-page "https://github.com/eqrion/cbindgen/")
  515. (synopsis "Tool for generating C bindings to Rust code")
  516. (description
  517. "This package provides a tool for generating C/C++ bindings to Rust code.")
  518. (license license:mpl2.0)))
  519. (define-public rust-cbindgen-0.19
  520. (package
  521. (inherit rust-cbindgen)
  522. (name "rust-cbindgen")
  523. (version "0.19.0")
  524. (source
  525. (origin
  526. (method url-fetch)
  527. (uri (crate-uri "cbindgen" version))
  528. (file-name
  529. (string-append name "-" version ".tar.gz"))
  530. (sha256
  531. (base32
  532. "1yld9fni9g9mzg4r42zfk79aq9mzm2sfzzjrrx4vir4lp4qqqwiq"))))
  533. (arguments
  534. `(#:cargo-inputs
  535. (("rust-clap" ,rust-clap-2)
  536. ("rust-heck" ,rust-heck-0.3)
  537. ("rust-indexmap" ,rust-indexmap-1)
  538. ("rust-log" ,rust-log-0.4)
  539. ("rust-proc-macro2" ,rust-proc-macro2-1)
  540. ("rust-quote" ,rust-quote-1)
  541. ("rust-serde" ,rust-serde-1)
  542. ("rust-serde-json" ,rust-serde-json-1)
  543. ("rust-syn" ,rust-syn-1)
  544. ("rust-tempfile" ,rust-tempfile-3)
  545. ("rust-toml" ,rust-toml-0.5))
  546. #:cargo-development-inputs
  547. (("rust-serial-test" ,rust-serial-test-0.5))))
  548. (native-inputs
  549. `(("python-cython" ,python-cython)))))
  550. (define-public rust-cbindgen-0.16
  551. (package
  552. (inherit rust-cbindgen)
  553. (name "rust-cbindgen")
  554. (version "0.16.0")
  555. (source
  556. (origin
  557. (method url-fetch)
  558. (uri (crate-uri "cbindgen" version))
  559. (file-name (string-append name "-" version ".tar.gz"))
  560. (sha256
  561. (base32 "049cai626nzw0km03parx4sxwaxgbr7i5ifjbjwnfxkqkj5k2i4k"))))
  562. (arguments
  563. `(#:tests? #false ;missing files
  564. #:cargo-inputs
  565. (("rust-clap" ,rust-clap-2)
  566. ("rust-heck" ,rust-heck-0.3)
  567. ("rust-indexmap" ,rust-indexmap-1)
  568. ("rust-log" ,rust-log-0.4)
  569. ("rust-proc-macro2" ,rust-proc-macro2-1)
  570. ("rust-quote" ,rust-quote-1)
  571. ("rust-serde" ,rust-serde-1)
  572. ("rust-serde-json" ,rust-serde-json-1)
  573. ("rust-syn" ,rust-syn-1)
  574. ("rust-tempfile" ,rust-tempfile-3)
  575. ("rust-toml" ,rust-toml-0.5))
  576. #:cargo-development-inputs
  577. (("rust-serial-test" ,rust-serial-test-0.5))))))
  578. (define-public rust-cbindgen-0.15
  579. (package
  580. (inherit rust-cbindgen)
  581. (name "rust-cbindgen")
  582. (version "0.15.0")
  583. (source
  584. (origin
  585. (method url-fetch)
  586. (uri (crate-uri "cbindgen" version))
  587. (file-name (string-append name "-" version ".tar.gz"))
  588. (sha256
  589. (base32 "0dgf49zij9rxnf0lv4k5gcmx1mxcz16czkk6q63anz0xp8ds3xhx"))))
  590. (arguments
  591. `(#:tests? #false ;missing files
  592. #:cargo-inputs
  593. (("rust-clap" ,rust-clap-2)
  594. ("rust-heck" ,rust-heck-0.3)
  595. ("rust-indexmap" ,rust-indexmap-1)
  596. ("rust-log" ,rust-log-0.4)
  597. ("rust-proc-macro2" ,rust-proc-macro2-1)
  598. ("rust-quote" ,rust-quote-1)
  599. ("rust-serde" ,rust-serde-1)
  600. ("rust-serde-json" ,rust-serde-json-1)
  601. ("rust-syn" ,rust-syn-1)
  602. ("rust-tempfile" ,rust-tempfile-3)
  603. ("rust-toml" ,rust-toml-0.5))))))
  604. (define-public rust-cbindgen-0.14
  605. (package
  606. (inherit rust-cbindgen)
  607. (name "rust-cbindgen")
  608. (version "0.14.1")
  609. (source
  610. (origin
  611. (method url-fetch)
  612. (uri (crate-uri "cbindgen" version))
  613. (file-name
  614. (string-append name "-" version ".tar.gz"))
  615. (sha256
  616. (base32
  617. "1ppwqbzydxlg9a24lynzfk60xrvqw4k31mpz1wrk6lbf88zf8nxi"))))))
  618. (define-public rust-cbindgen-0.12
  619. (package
  620. (inherit rust-cbindgen)
  621. (name "rust-cbindgen")
  622. (version "0.12.2")
  623. (source
  624. (origin
  625. (method url-fetch)
  626. (uri (crate-uri "cbindgen" version))
  627. (file-name
  628. (string-append name "-" version ".tar.gz"))
  629. (sha256
  630. (base32
  631. "13jzbmjz1bmmfr0i80hw6ar484mgabx3hbpb2ynhk0ddqi0yr58m"))))))
  632. (define-public sniffglue
  633. (package
  634. (name "sniffglue")
  635. (version "0.12.1")
  636. (source
  637. (origin
  638. (method url-fetch)
  639. (uri (crate-uri "sniffglue" version))
  640. (file-name
  641. (string-append name "-" version ".tar.gz"))
  642. (sha256
  643. (base32
  644. "1q1kwkw1hq38qgvc6j4b5l9m85a6lpn1jls4bm27c5kha9cg8l24"))))
  645. (build-system cargo-build-system)
  646. (arguments
  647. `(#:cargo-inputs
  648. (("rust-ansi-term" ,rust-ansi-term-0.12)
  649. ("rust-anyhow" ,rust-anyhow-1)
  650. ("rust-atty" ,rust-atty-0.2)
  651. ("rust-base64" ,rust-base64-0.13)
  652. ("rust-dhcp4r" ,rust-dhcp4r-0.2)
  653. ("rust-dirs-next" ,rust-dirs-next-2)
  654. ("rust-dns-parser" ,rust-dns-parser-0.8)
  655. ("rust-env-logger" ,rust-env-logger-0.8)
  656. ("rust-libc" ,rust-libc-0.2)
  657. ("rust-log" ,rust-log-0.4)
  658. ("rust-nix" ,rust-nix-0.20)
  659. ("rust-nom" ,rust-nom-6)
  660. ("rust-num-cpus" ,rust-num-cpus-1)
  661. ("rust-pcap-sys" ,rust-pcap-sys-0.1)
  662. ("rust-pktparse" ,rust-pktparse-0.5)
  663. ("rust-reduce" ,rust-reduce-0.1)
  664. ("rust-serde" ,rust-serde-1)
  665. ("rust-serde-derive" ,rust-serde-derive-1)
  666. ("rust-serde-json" ,rust-serde-json-1)
  667. ("rust-sha2" ,rust-sha2-0.9)
  668. ("rust-structopt" ,rust-structopt-0.3)
  669. ("rust-syscallz" ,rust-syscallz-0.15)
  670. ("rust-tls-parser" ,rust-tls-parser-0.10)
  671. ("rust-toml" ,rust-toml-0.5)
  672. ("rust-users" ,rust-users-0.11))
  673. #:cargo-development-inputs
  674. (("rust-boxxy" ,rust-boxxy-0.11))))
  675. (inputs
  676. `(("libpcap" ,libpcap)
  677. ("libseccomp" ,libseccomp)))
  678. (home-page "https://github.com/kpcyrd/sniffglue")
  679. (synopsis "Secure multithreaded packet sniffer")
  680. (description
  681. "This package provides a network sniffer written in Rust. Packets
  682. are parsed concurrently using a thread pool to utilize all cpu cores. A goal
  683. of the project is to be runnable on untrusted networks without crashing.")
  684. (license license:gpl3)))
  685. (define-public tectonic
  686. (package
  687. (name "tectonic")
  688. (version "0.7.1")
  689. (source
  690. (origin
  691. (method url-fetch)
  692. (uri (crate-uri "tectonic" version))
  693. (file-name (string-append name "-" version ".tar.gz"))
  694. (sha256
  695. (base32 "0rjkfmbam81anpdqs2qafcmd5bf7y898c8a7iqqqwkbl1hfw4sqs"))))
  696. (build-system cargo-build-system)
  697. (arguments
  698. `(#:rust ,rust-1.52
  699. #:cargo-build-flags '("--release" "--features" "external-harfbuzz")
  700. #:cargo-inputs
  701. (("rust-atty" ,rust-atty-0.2)
  702. ("rust-byte-unit" ,rust-byte-unit-4)
  703. ("rust-cfg-if" ,rust-cfg-if-1)
  704. ("rust-error-chain" ,rust-error-chain-0.12)
  705. ("rust-flate2" ,rust-flate2-1)
  706. ("rust-fs2" ,rust-fs2-0.4)
  707. ("rust-lazy-static" ,rust-lazy-static-1)
  708. ("rust-libc" ,rust-libc-0.2)
  709. ("rust-md-5" ,rust-md-5-0.9)
  710. ("rust-open" ,rust-open-1)
  711. ("rust-quick-xml" ,rust-quick-xml-0.22)
  712. ("rust-serde" ,rust-serde-1)
  713. ("rust-sha2" ,rust-sha2-0.9)
  714. ("rust-structopt" ,rust-structopt-0.3)
  715. ("rust-tectonic-bridge-core" ,rust-tectonic-bridge-core-0.2)
  716. ("rust-tectonic-bundles" ,rust-tectonic-bundles-0.1)
  717. ("rust-tectonic-docmodel" ,rust-tectonic-docmodel-0.1)
  718. ("rust-tectonic-engine-bibtex" ,rust-tectonic-engine-bibtex-0.1)
  719. ("rust-tectonic-engine-xdvipdfmx" ,rust-tectonic-engine-xdvipdfmx-0.1)
  720. ("rust-tectonic-engine-xetex" ,rust-tectonic-engine-xetex-0.1)
  721. ("rust-tectonic-errors" ,rust-tectonic-errors-0.2)
  722. ("rust-tectonic-geturl" ,rust-tectonic-geturl-0.2)
  723. ("rust-tectonic-io-base" ,rust-tectonic-io-base-0.3)
  724. ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.2)
  725. ("rust-tectonic-xdv" ,rust-tectonic-xdv-0.1)
  726. ("rust-tectonic-xetex-layout" ,rust-tectonic-xetex-layout-0.1)
  727. ("rust-tempfile" ,rust-tempfile-3)
  728. ("rust-termcolor" ,rust-termcolor-1)
  729. ("rust-toml" ,rust-toml-0.5)
  730. ("rust-url" ,rust-url-2)
  731. ("rust-watchexec" ,rust-watchexec-1)
  732. ("rust-zip" ,rust-zip-0.5))
  733. #:cargo-development-inputs
  734. (("rust-filetime" ,rust-filetime-0.2)
  735. ("rust-futures" ,rust-futures-0.1)
  736. ("rust-headers" ,rust-headers-0.2)
  737. ("rust-hyper" ,rust-hyper-0.12)
  738. ("rust-tempfile" ,rust-tempfile-3)
  739. ("rust-tokio" ,rust-tokio-0.1))
  740. #:phases
  741. (modify-phases %standard-phases
  742. (add-after 'install 'install-doc
  743. (lambda* (#:key outputs #:allow-other-keys)
  744. (let* ((out (assoc-ref outputs "out"))
  745. (doc (string-append out "/share/doc/" ,name "-" ,version)))
  746. (copy-recursively "docs/src" doc)))))))
  747. (native-inputs
  748. `(("pkg-config" ,pkg-config)))
  749. (inputs
  750. `(("fontconfig" ,fontconfig)
  751. ("harfbuzz" ,harfbuzz)
  752. ("openssl" ,openssl)
  753. ("zlib" ,zlib)))
  754. (home-page "https://tectonic-typesetting.github.io/")
  755. (synopsis "Complete, embeddable TeX/LaTeX engine")
  756. (description
  757. "This package provides a modernized, complete, embeddable
  758. TeX/LaTeX engine. Tectonic is forked from the XeTeX extension to the
  759. classic Web2C implementation of TeX and uses the TeXLive distribution
  760. of support files.")
  761. (license license:expat)))
  762. (define-public tokei
  763. (package
  764. (name "tokei")
  765. (version "12.1.2")
  766. (source
  767. (origin
  768. (method url-fetch)
  769. (uri (crate-uri "tokei" version))
  770. (file-name (string-append name "-" version ".tar.gz"))
  771. (sha256
  772. (base32 "000w549v1bpw7r57xw656p40ywf1gimvxxx5cjnri2js0xg927x4"))))
  773. (build-system cargo-build-system)
  774. (arguments
  775. `(#:cargo-inputs
  776. (("rust-aho-corasick" ,rust-aho-corasick-0.7)
  777. ("rust-clap" ,rust-clap-2)
  778. ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
  779. ("rust-dashmap" ,rust-dashmap-4)
  780. ("rust-dirs" ,rust-dirs-3)
  781. ("rust-encoding-rs-io" ,rust-encoding-rs-io-0.1)
  782. ("rust-env-logger" ,rust-env-logger-0.8)
  783. ("rust-grep-searcher" ,rust-grep-searcher-0.1)
  784. ("rust-hex" ,rust-hex-0.4)
  785. ("rust-ignore" ,rust-ignore-0.4)
  786. ("rust-log" ,rust-log-0.4)
  787. ("rust-num-format" ,rust-num-format-0.4)
  788. ("rust-once-cell" ,rust-once-cell-1)
  789. ("rust-parking-lot" ,rust-parking-lot-0.11)
  790. ("rust-rayon" ,rust-rayon-1)
  791. ("rust-regex" ,rust-regex-1)
  792. ("rust-serde" ,rust-serde-1)
  793. ("rust-serde-cbor" ,rust-serde-cbor-0.11)
  794. ("rust-serde-json" ,rust-serde-json-1)
  795. ("rust-serde-yaml" ,rust-serde-yaml-0.8)
  796. ("rust-tera" ,rust-tera-1)
  797. ("rust-term-size" ,rust-term-size-0.3)
  798. ("rust-toml" ,rust-toml-0.5))
  799. #:cargo-development-inputs
  800. (("rust-git2" ,rust-git2-0.13)
  801. ("rust-regex" ,rust-regex-1)
  802. ("rust-tempfile" ,rust-tempfile-3))))
  803. (native-inputs
  804. `(("pkg-config" ,pkg-config)))
  805. (inputs
  806. `(("libgit2" ,libgit2)
  807. ("openssl" ,openssl)
  808. ("zlib" ,zlib)))
  809. (home-page "https://tokei.rs")
  810. (synopsis "Count code, quickly")
  811. (description
  812. "Tokei is a program that displays statistics about your code. Tokei will
  813. show number of files, total lines within those files and code, comments, and
  814. blanks grouped by language.")
  815. (license (list license:expat license:asl2.0))))
  816. (define-public watchexec
  817. (package
  818. (name "watchexec")
  819. (version "1.16.1")
  820. (source
  821. (origin
  822. (method url-fetch)
  823. (uri (crate-uri "watchexec-cli" version))
  824. (file-name (string-append name "-" version ".tar.gz"))
  825. (sha256
  826. (base32 "1wp424gzw1zmax5yy5gya15knl24rjx8gi9c7palvq807q3cnj65"))))
  827. (build-system cargo-build-system)
  828. (arguments
  829. `(#:phases
  830. (modify-phases %standard-phases
  831. (add-after 'install 'install-completions
  832. (lambda* (#:key outputs #:allow-other-keys)
  833. (let* ((out (assoc-ref outputs "out"))
  834. (zsh (string-append out "/share/zsh/site-functions/_watchexec"))
  835. (doc (string-append out "/share/doc/watchexec-" ,version)))
  836. (mkdir-p (dirname zsh))
  837. ;; FIXME: The crates.io source does not provide zsh
  838. ;; completions. But the GitHub source does not compile.
  839. ;;
  840. ;; (copy-file "completions/zsh" zsh)
  841. (install-file "README.md" doc)))))
  842. #:cargo-inputs
  843. (("rust-clap" ,rust-clap-2)
  844. ("rust-embed-resource" ,rust-embed-resource-1)
  845. ("rust-env-logger" ,rust-env-logger-0.8)
  846. ("rust-log" ,rust-log-0.4)
  847. ("rust-watchexec" ,rust-watchexec-1))
  848. #:cargo-development-inputs
  849. (("rust-assert-cmd" ,rust-assert-cmd-1)
  850. ("rust-insta" ,rust-insta-1))))
  851. (home-page "https://github.com/watchexec/watchexec")
  852. (synopsis "Executes commands in response to file modifications")
  853. (description
  854. "@command{watchexec} is a simple, standalone tool that watches a path and
  855. runs a command whenever it detects modifications.")
  856. (license license:asl2.0)))
  857. (define-public rust-analyzer
  858. (package
  859. (name "rust-analyzer")
  860. (version "2021-06-07")
  861. (source
  862. (origin
  863. ;; The crate at "crates.io" is empty.
  864. (method git-fetch)
  865. (uri (git-reference
  866. (url "https://github.com/rust-analyzer/rust-analyzer")
  867. (commit version)))
  868. (file-name (git-file-name name version))
  869. (sha256
  870. (base32
  871. "06bc3s5kjwpyr2cq79p0306a9bqp3xp928d750ybby9npq2dvj3z"))))
  872. (build-system cargo-build-system)
  873. (arguments
  874. `(#:rust ,rust-1.52
  875. #:install-source? #f ; virtual manifest
  876. #:cargo-test-flags
  877. '("--release" "--"
  878. "--skip=tests::test_version_check" ;; It need rustc's version
  879. ;; FIXME: Guix's rust not install source in %out/lib/rustlib/src/rust
  880. ;; so "can't load standard library from sysroot"
  881. "--skip=tests::test_loading_rust_analyzer"
  882. "--skip=tidy::cargo_files_are_tidy" ;; Not need
  883. "--skip=tidy::check_licenses" ;; It run cargo metadata.
  884. "--skip=tidy::check_merge_commits" ;; It run git rev-list.
  885. "--skip=tidy::check_code_formatting" ;; Need rustfmt as cargo fmt
  886. "--skip=tidy::generate_grammar" ;; Same
  887. "--skip=tidy::generate_assists_tests") ;; Same
  888. #:cargo-inputs
  889. (("rust-always-assert" ,rust-always-assert-0.1)
  890. ("rust-anyhow" ,rust-anyhow-1)
  891. ("rust-anymap" ,rust-anymap-0.12)
  892. ("rust-arrayvec" ,rust-arrayvec-0.7)
  893. ("rust-backtrace" ,rust-backtrace-0.3)
  894. ("rust-cargo-metadata" ,rust-cargo-metadata-0.13)
  895. ("rust-cfg-if" ,rust-cfg-if-1)
  896. ("rust-chalk-ir" ,rust-chalk-ir-0.68)
  897. ("rust-chalk-recursive" ,rust-chalk-recursive-0.68)
  898. ("rust-chalk-solve" ,rust-chalk-solve-0.68)
  899. ("rust-countme" ,rust-countme-2)
  900. ("rust-cov-mark" ,rust-cov-mark-1)
  901. ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
  902. ("rust-dashmap" ,rust-dashmap-4)
  903. ("rust-dissimilar" ,rust-dissimilar-1)
  904. ("rust-dot" ,rust-dot-0.1)
  905. ("rust-drop-bomb" ,rust-drop-bomb-0.1)
  906. ("rust-either" ,rust-either-1)
  907. ("rust-ena" ,rust-ena-0.14)
  908. ("rust-env-logger" ,rust-env-logger-0.8)
  909. ("rust-expect-test" ,rust-expect-test-1)
  910. ("rust-flate2" ,rust-flate2-1)
  911. ("rust-fst" ,rust-fst-0.4)
  912. ("rust-home" ,rust-home-0.5)
  913. ("rust-indexmap" ,rust-indexmap-1)
  914. ("rust-itertools" ,rust-itertools-0.10)
  915. ("rust-jod-thread" ,rust-jod-thread-0.1)
  916. ("rust-libc" ,rust-libc-0.2)
  917. ("rust-libloading" ,rust-libloading-0.7)
  918. ("rust-log" ,rust-log-0.4)
  919. ("rust-lsp-server" ,rust-lsp-server-0.5)
  920. ("rust-lsp-types" ,rust-lsp-types-0.89)
  921. ("rust-memmap2" ,rust-memmap2-0.2)
  922. ("rust-mimalloc" ,rust-mimalloc-0.1)
  923. ("rust-miow" ,rust-miow-0.3)
  924. ("rust-notify" ,rust-notify-5)
  925. ("rust-object" ,rust-object-0.24)
  926. ("rust-once-cell" ,rust-once-cell-1)
  927. ("rust-oorandom" ,rust-oorandom-11.1)
  928. ("rust-parking-lot" ,rust-parking-lot-0.11)
  929. ("rust-perf-event" ,rust-perf-event-0.4)
  930. ("rust-proc-macro2" ,rust-proc-macro2-1)
  931. ("rust-pulldown-cmark" ,rust-pulldown-cmark-0.8)
  932. ("rust-pulldown-cmark-to-cmark" ,rust-pulldown-cmark-to-cmark-6)
  933. ("rust-quote" ,rust-quote-1)
  934. ("rust-rayon" ,rust-rayon-1)
  935. ("rust-rowan" ,rust-rowan-0.13)
  936. ("rust-rustc-ap-rustc-lexer" ,rust-rustc-ap-rustc-lexer-721)
  937. ("rust-rustc-hash" ,rust-rustc-hash-1)
  938. ("rust-salsa" ,rust-salsa-0.17)
  939. ("rust-scoped-tls" ,rust-scoped-tls-1)
  940. ("rust-serde" ,rust-serde-1)
  941. ("rust-serde-json" ,rust-serde-json-1)
  942. ("rust-serde-path-to-error" ,rust-serde-path-to-error-0.1)
  943. ("rust-smallvec" ,rust-smallvec-1)
  944. ("rust-smol-str" ,rust-smol-str-0.1)
  945. ("rust-snap" ,rust-snap-1)
  946. ("rust-text-size" ,rust-text-size-1)
  947. ("rust-threadpool" ,rust-threadpool-1)
  948. ("rust-tikv-jemalloc-ctl" ,rust-tikv-jemalloc-ctl-0.4)
  949. ("rust-tikv-jemallocator" ,rust-tikv-jemallocator-0.4)
  950. ("rust-tracing" ,rust-tracing-0.1)
  951. ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.2)
  952. ("rust-tracing-tree" ,rust-tracing-tree-0.1)
  953. ("rust-ungrammar" ,rust-ungrammar-1)
  954. ("rust-url" ,rust-url-2)
  955. ("rust-walkdir" ,rust-walkdir-2)
  956. ("rust-winapi" ,rust-winapi-0.3)
  957. ("rust-write-json" ,rust-write-json-0.1)
  958. ("rust-xflags" ,rust-xflags-0.2)
  959. ("rust-xshell" ,rust-xshell-0.1))
  960. #:phases
  961. (modify-phases %standard-phases
  962. (add-after 'unpack 'patch-build-failures
  963. (lambda _
  964. (chmod ".cargo/config" 420)
  965. #t))
  966. (add-before 'check 'fix-tests
  967. (lambda* (#:key inputs #:allow-other-keys)
  968. (let ((bash (string-append "#!" (which "bash"))))
  969. (with-directory-excursion "crates/syntax/test_data/lexer/ok"
  970. (substitute* "0010_single_line_comments.txt"
  971. (("SHEBANG 19")
  972. (string-append "SHEBANG "
  973. (number->string (string-length bash))))
  974. (("#!/usr/bin/env bash") bash))))))
  975. (replace 'install
  976. (lambda* (#:key outputs #:allow-other-keys)
  977. (install-file "target/release/rust-analyzer"
  978. (string-append (assoc-ref outputs "out")
  979. "/bin")))))))
  980. (home-page "https://rust-analyzer.github.io/")
  981. (synopsis "Experimental Rust compiler front-end for IDEs")
  982. (description "Rust-analyzer is a modular compiler frontend for the Rust
  983. language. It is a part of a larger rls-2.0 effort to create excellent IDE
  984. support for Rust.")
  985. (license (list license:expat license:asl2.0))))
  986. (define-public rust-cargo-c
  987. (package
  988. (name "rust-cargo-c")
  989. (version "0.8.1+cargo-0.53")
  990. (source
  991. (origin
  992. (method url-fetch)
  993. (uri (crate-uri "cargo-c" version))
  994. (file-name
  995. (string-append name "-" version ".tar.gz"))
  996. (sha256
  997. (base32
  998. "0fwdxhdj2963xr6xfqr56i7hikhsdv562vgxq2dj3h2mi3dil1k6"))))
  999. (build-system cargo-build-system)
  1000. (arguments
  1001. `(#:rust ,rust-1.52 ;inherited from rust-cargo
  1002. #:cargo-inputs
  1003. (("rust-cbindgen" ,rust-cbindgen-0.19)
  1004. ("rust-cargo" ,rust-cargo-0.53) ;
  1005. ("rust-anyhow" ,rust-anyhow-1)
  1006. ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.4)
  1007. ("rust-structopt" ,rust-structopt-0.3)
  1008. ("rust-log" ,rust-log-0.4)
  1009. ("rust-toml" ,rust-toml-0.5)
  1010. ("rust-cargo-metadata" ,rust-cargo-metadata-0.9)
  1011. ("rust-semver" ,rust-semver-0.10)
  1012. ("rust-serde" ,rust-serde-1)
  1013. ("rust-serde-derive" ,rust-serde-derive-1)
  1014. ("rust-serde-json" ,rust-serde-json-1)
  1015. ("rust-regex" ,rust-regex-1))))
  1016. (native-inputs
  1017. `(("pkg-config" ,pkg-config)))
  1018. (inputs
  1019. `(("curl" ,curl)
  1020. ("libssh2" ,libssh2)
  1021. ("openssl" ,openssl)
  1022. ("zlib" ,zlib)))
  1023. (home-page "https://github.com/lu-zero/cargo-c")
  1024. (synopsis "Build and install C-compatible libraries")
  1025. (description
  1026. "This package produces and installs a correct pkg-config file, a static
  1027. library and a dynamic library, and a C header to be used by any C (and
  1028. C-compatible) software.")
  1029. (license license:expat)))
  1030. (define-public zoxide
  1031. (package
  1032. (name "zoxide")
  1033. (version "0.6.0")
  1034. (source
  1035. (origin
  1036. (method url-fetch)
  1037. (uri (crate-uri "zoxide" version))
  1038. (file-name (string-append name "-" version ".tar.gz"))
  1039. (sha256
  1040. (base32 "1ih01l3xp8plicxhmyxjkq12ncpdb8954jcj3dh3lwvkhvw29nkk"))))
  1041. (build-system cargo-build-system)
  1042. (arguments
  1043. `(#:cargo-inputs
  1044. (("rust-anyhow" ,rust-anyhow-1)
  1045. ("rust-askama" ,rust-askama-0.10)
  1046. ("rust-bincode" ,rust-bincode-1)
  1047. ("rust-clap" ,rust-clap-3)
  1048. ("rust-dirs-next" ,rust-dirs-next-2)
  1049. ("rust-dunce" ,rust-dunce-1)
  1050. ("rust-glob" ,rust-glob-0.3)
  1051. ("rust-once-cell" ,rust-once-cell-1)
  1052. ("rust-ordered-float" ,rust-ordered-float-2)
  1053. ("rust-rand" ,rust-rand-0.7)
  1054. ("rust-serde" ,rust-serde-1)
  1055. ("rust-tempfile" ,rust-tempfile-3))
  1056. #:cargo-development-inputs
  1057. (("rust-assert-cmd" ,rust-assert-cmd-1)
  1058. ("rust-seq-macro" ,rust-seq-macro-0.2))))
  1059. (home-page "https://github.com/ajeetdsouza/zoxide/")
  1060. (synopsis "Fast way to navigate your file system")
  1061. (description
  1062. "Zoxide is a fast replacement for your @command{cd} command. It keeps
  1063. track of the directories you use most frequently, and uses a ranking algorithm
  1064. to navigate to the best match.")
  1065. (license license:expat)))