Subject: [bug#40874] [PATCH 89/94] gnu: Add rust-which-3.

From: Hartmut Goebel <[email-masked]>
Date: Sun, 26 Apr 2020 18:46:08 +0200

* gnu/packages/crates-io.scm (rust-which-3): New variable.
  (rust-which-2.0): Inherit from it.
---
 gnu/packages/crates-io.scm | 43 ++++++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 07e03041f6..227100baf0 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -23622,22 +23622,24 @@ Verification.")
      "This package provides a WebIDL Parser.")
     (license license:expat)))
 
-(define-public rust-which-2.0
+(define-public rust-which-3
   (package
     (name "rust-which")
-    (version "2.0.1")
+    (version "3.1.1")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "which" version))
-       (file-name
-        (string-append name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "0r7i793sc0xqnd2fxnqbksj7j1kx65bwn81b8z49750v4c8cnymm"))))
+        (base32 "094pw9pi48szshn9ln69z2kg7syq1jp80h5ps1qncbsaw4d0f4fh"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t
+     `(#:tests? #f ;; 1/14 tests fail: No such file or directory
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'setenv
+             (lambda _ (setenv "HOME" "/tmp") #t)))
        #:cargo-inputs
        (("rust-failure" ,rust-failure-0.1)
         ("rust-libc" ,rust-libc-0.2))
@@ -23650,6 +23652,27 @@ Verification.")
 Locate installed executable in cross platforms.")
     (license license:expat)))
 
+(define-public rust-which-2.0
+  (package/inherit rust-which-3
+    (name "rust-which")
+    (version "2.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "which" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0r7i793sc0xqnd2fxnqbksj7j1kx65bwn81b8z49750v4c8cnymm"))))
+    (arguments
+     `(#:tests? #f ;; 1/14 tests fail: No such file or directory
+       #:cargo-inputs
+       (("rust-failure" ,rust-failure-0.1)
+        ("rust-libc" ,rust-libc-0.2))
+       #:cargo-development-inputs
+       (("rust-tempdir" ,rust-tempdir-0.3))))))
+
 (define-public rust-which-1.0
   (package
     (inherit rust-which-2.0)
@@ -23659,11 +23682,9 @@ Locate installed executable in cross platforms.")
      (origin
        (method url-fetch)
        (uri (crate-uri "which" version))
-       (file-name
-        (string-append name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "1cjwa57kzfgzs681a27m5pjmq580pv3hkcg23smf270bgqz60jp8"))))
+        (base32 "1cjwa57kzfgzs681a27m5pjmq580pv3hkcg23smf270bgqz60jp8"))))
     (arguments
      `(#:tests? #f
        #:cargo-inputs
-- 
2.21.3