Subject: [PATCH 04/43] gnu: Add rust-which-6.

From: normalmente <[email-masked]>
Date: Tue, 19 Mar 2024 03:50:35 +0000

* gnu/packages/crates-io.scm (rust-which-6): New variable.

Change-Id: Ib45002331c9ab06ed2d4584028ad9254cce99208
---
 gnu/packages/crates-io.scm | 46 ++++++++++++++++++++++++++++++--------
 1 file changed, 37 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a50417eb89..f70e756037 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -78498,8 +78498,43 @@ (define-public rust-wepoll-sys-stjepang-1
 using @code{bindgen}.")
     (license license:mpl2.0)))
 
+(define-public rust-which-6
+  (package
+    (name "rust-which")
+    (version "6.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "which" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "070hbvl3hjxywychmz7nj5gbsprdm38rir3kqnm48zzp1g0y19bz"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-test-flags
+       '("--release" "--"
+         ;; Not all files included.
+         "--skip=it_works")
+       #:cargo-inputs
+       (("rust-either" ,rust-either-1)
+        ("rust-home" ,rust-home-0.5)
+        ("rust-once-cell" ,rust-once-cell-1)
+        ("rust-regex" ,rust-regex-1)
+        ("rust-rustix" ,rust-rustix-0.38)
+        ("rust-windows-sys" ,rust-windows-sys-0.52))
+       #:cargo-development-inputs
+       (("rust-tempfile" ,rust-tempfile-3))))
+    (home-page "https://github.com/harryfei/which-rs.git")
+    (synopsis "Rust equivalent of @command{which}")
+    (description
+     "This package provides a cross-platform Rust equivalent of the
+Unix @command{which} command.  It returns the full path of an installed
+executable.")
+    (license license:expat)))
+
 (define-public rust-which-5
   (package
+    (inherit rust-which-6)
     (name "rust-which")
     (version "5.0.0")
     (source
@@ -78514,7 +78549,6 @@ (define-public rust-which-5
         '(begin (substitute* "Cargo.toml"
                   (("\"= *([[:digit:]]+(\\.[[:digit:]]+)*)" _ version)
                    (string-append "\"^" version)))))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-test-flags
        '("--release" "--"
@@ -78526,14 +78560,8 @@ (define-public rust-which-5
                        ("rust-regex" ,rust-regex-1)
                        ("rust-rustix" ,rust-rustix-0.38)
                        ("rust-windows-sys" ,rust-windows-sys-0.48))
-       #:cargo-development-inputs (("rust-tempfile" ,rust-tempfile-3))))
-    (home-page "https://github.com/harryfei/which-rs.git")
-    (synopsis "Rust equivalent of @command{which}")
-    (description
-     "This package provides a cross-platform Rust equivalent of the
-Unix @command{which} command.  It returns the full path of an installed
-executable.")
-    (license license:expat)))
+       #:cargo-development-inputs (("rust-tempfile" ,rust-tempfile-3))))))
+
 
 (define-public rust-which-4
   (package
-- 
2.41.0