summaryrefslogtreecommitdiff
path: root/gnu/packages/rust-apps.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-03-09 16:43:16 +0200
committerEfraim Flashner <efraim@flashner.co.il>2023-05-07 19:29:22 +0300
commit1b36364c706ccf742e4216d453cee19e49036201 (patch)
tree93596dda29172dac31cb1476ce5a7a99ac2156a0 /gnu/packages/rust-apps.scm
parent25585ac773b9548db08bf32f1e0f9735dd2e2744 (diff)
gnu: fd: Update to 8.7.0.
* gnu/packages/rust-apps.scm (fd): Update to 8.7.0. [arguments]: Add cargo-test-flags to skip a test. Don't install source. Adjust custom 'override-jemalloc phase to continue using system jemalloc. Rewrite custom 'install-extra phase for changes in source code. [cargo-inputs]: Add rust-anyhow-1, rust-argmax-0.3, rust-chrono-0.4, rust-clap-complete-4, rust-crossbeam-channel-0.5, rust-dirs-next-2, rust-faccess-0.2, rust-nix-0.26, rust-normpath-0.3, rust-nu-ansi-term-0.46, rust-once-cell-1. Remove rust-dirs-2, rust-lazy-static-1. Replace rust-clap-2 with 4, rust-jemallocator-0.3 with 0.5, rust-lscolors-0.7 with 0.13, rust-users-0.10 with 0.11. [cargo-development-inputs]: Add rust-tempfile-3, rust-test-case-2. Remove rust-tempdir-0.3.
Diffstat (limited to 'gnu/packages/rust-apps.scm')
-rw-r--r--gnu/packages/rust-apps.scm65
1 files changed, 39 insertions, 26 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 7a6e8e367f..ffc3247d43 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -458,7 +458,7 @@ also knows about symlinks, extended attributes, and Git.")
(define-public fd
(package
(name "fd")
- (version "8.1.1")
+ (version "8.7.0")
(source
(origin
(method url-fetch)
@@ -467,58 +467,71 @@ also knows about symlinks, extended attributes, and Git.")
(string-append name "-" version ".tar.gz"))
(sha256
(base32
- "124a5r8hpk2phs1288jybh34d48yxy44wr7gv5ggchs272gs2jam"))))
+ "186217yyb0znfn4jcc9l3i51fhfyb23lhbm3gg084sdrbj6bdnbg"))))
(build-system cargo-build-system)
(arguments
- `(#:cargo-inputs
- (("rust-ansi-term" ,rust-ansi-term-0.12)
- ("rust-anyhow" ,rust-anyhow-1)
+ `(#:cargo-test-flags
+ '("--release"
+ "--"
+ ;; No user 'root' in the build environment.
+ "--skip=test_owner_root")
+ #:install-source? #f
+ #:cargo-inputs
+ (("rust-anyhow" ,rust-anyhow-1)
+ ("rust-argmax" ,rust-argmax-0.3)
("rust-atty" ,rust-atty-0.2)
- ("rust-clap" ,rust-clap-2)
+ ("rust-chrono" ,rust-chrono-0.4)
+ ("rust-clap" ,rust-clap-4)
+ ("rust-clap-complete" ,rust-clap-complete-4)
+ ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
("rust-ctrlc" ,rust-ctrlc-3)
- ("rust-dirs" ,rust-dirs-2)
+ ("rust-dirs-next" ,rust-dirs-next-2)
+ ("rust-faccess" ,rust-faccess-0.2)
("rust-globset" ,rust-globset-0.4)
("rust-humantime" ,rust-humantime-2)
("rust-ignore" ,rust-ignore-0.4)
- ("rust-jemallocator" ,rust-jemallocator-0.3)
- ("rust-lazy-static" ,rust-lazy-static-1)
+ ("rust-jemallocator" ,rust-jemallocator-0.5)
("rust-libc" ,rust-libc-0.2)
- ("rust-lscolors" ,rust-lscolors-0.7)
+ ("rust-lscolors" ,rust-lscolors-0.13)
+ ("rust-nix" ,rust-nix-0.26)
+ ("rust-normpath" ,rust-normpath-0.3)
+ ("rust-nu-ansi-term" ,rust-nu-ansi-term-0.46)
("rust-num-cpus" ,rust-num-cpus-1)
+ ("rust-once-cell" ,rust-once-cell-1)
("rust-regex" ,rust-regex-1)
("rust-regex-syntax" ,rust-regex-syntax-0.6)
- ("rust-users" ,rust-users-0.10)
+ ("rust-users" ,rust-users-0.11)
("rust-version-check" ,rust-version-check-0.9))
#:cargo-development-inputs
(("rust-diff" ,rust-diff-0.1)
("rust-filetime" ,rust-filetime-0.2)
- ("rust-tempdir" ,rust-tempdir-0.3))
+ ("rust-tempfile" ,rust-tempfile-3)
+ ("rust-test-case" ,rust-test-case-2))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'override-jemalloc
(lambda* (#:key inputs #:allow-other-keys)
(let ((jemalloc (assoc-ref inputs "jemalloc")))
+ ;; This flag is needed when not using the bundled jemalloc.
+ ;; https://github.com/tikv/jemallocator/issues/19
+ (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
(setenv "JEMALLOC_OVERRIDE"
- (string-append jemalloc "/lib/libjemalloc.so")))
- #t))
+ (string-append jemalloc "/lib/libjemalloc.so")))))
(add-after 'install 'install-extra
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (install-completion
- (lambda (completion out-dir)
- (for-each
- (lambda (f)
- (install-file f (string-append out out-dir)))
- (find-files "target/release/build/" completion)))))
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "make" "completions")
;; Manpages
(install-file "doc/fd.1" (string-append out "/share/man/man1"))
;; Completions
- (install-completion "^fd.bash$" "/etc/bash_completion.d")
- (install-completion "^fd.fish$" "/share/fish/vendor_completions.d")
- (install-completion "^_fd$" "/share/zsh/site-functions")
+ (install-file "autocomplete/fd.bash"
+ (string-append out "/etc/bash_completion.d"))
+ (install-file "autocomplete/fd.fish"
+ (string-append out "/share/fish/vendor_completions.d"))
+ (install-file "autocomplete/_fd"
+ (string-append out "/share/zsh/site-functions"))
(rename-file (string-append out "/etc/bash_completion.d/fd.bash")
- (string-append out "/etc/bash_completion.d/fd"))
- #t))))))
+ (string-append out "/etc/bash_completion.d/fd"))))))))
(inputs (list jemalloc))
(home-page "https://github.com/sharkdp/fd")
(synopsis "Simple, fast and user-friendly alternative to find")