guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

16/37: gnu: fd: Update to 8.7.0.


From: guix-commits
Subject: 16/37: gnu: fd: Update to 8.7.0.
Date: Thu, 9 Mar 2023 12:12:02 -0500 (EST)

efraim pushed a commit to branch rust-team
in repository guix.

commit 51bd933906648dae8c918f2d644d7ad25a6e5fdf
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Mar 9 16:43:16 2023 +0200

    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.
---
 gnu/packages/rust-apps.scm | 65 +++++++++++++++++++++++++++-------------------
 1 file changed, 39 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 4a8f85bbcd..188bf5627c 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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]