Subject: [PATCH rust-team v2 103/117] WIP: gnu: Add rust-async-fs-2.

From: Herman Rimm <[email-masked]>
Date: Sun, 28 Apr 2024 20:58:47 +0200

* gnu/packages/crates-io.scm (rust-async-fs-2): Add variable.
(rust-async-fs-1): Inherit.

Change-Id: I5d75f7867a276cce680da8ddd786e7364af1aa68
---
 gnu/packages/crates-io.scm | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b6621926f9..391815ce34 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -5028,8 +5028,33 @@ (define-public rust-async-executor-1
     (description "This library provides async executors.")
     (license (list license:asl2.0 license:expat))))
 
+(define-public rust-async-fs-2
+  (package
+    (name "rust-async-fs")
+    (version "2.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "async-fs" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0jp0p7lg9zqy2djgdmivbzx0yqmfn9sm2s9dkhaws3zlharhkkgb"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-async-lock" ,rust-async-lock-3)
+                       ("rust-blocking" ,rust-blocking-1)
+                       ("rust-futures-lite" ,rust-futures-lite-2))
+       #:cargo-development-inputs
+       (("rust-libc" ,rust-libc-0.2)
+        ("rust-windows-sys" ,rust-windows-sys-0.52))))
+    (home-page "https://github.com/smol-rs/async-fs")
+    (synopsis "Async filesystem primitives")
+    (description "This package provides async filesystem primitives.")
+    (license (list license:asl2.0 license:expat))))
+
 (define-public rust-async-fs-1
   (package
+    (inherit rust-async-fs-2)
     (name "rust-async-fs")
     (version "1.6.0")
     (source
@@ -5039,18 +5064,13 @@ (define-public rust-async-fs-1
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "01if2h77mry9cnm91ql2md595108i2c1bfy9gaivzvjfcl2gk717"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs (("rust-async-lock" ,rust-async-lock-2)
                        ("rust-autocfg" ,rust-autocfg-1)
                        ("rust-blocking" ,rust-blocking-1)
                        ("rust-futures-lite" ,rust-futures-lite-1))
        #:cargo-development-inputs (("rust-libc" ,rust-libc-0.2)
-                                   ("rust-winapi" ,rust-winapi-0.3))))
-    (home-page "https://github.com/smol-rs/async-fs")
-    (synopsis "Async filesystem primitives")
-    (description "This package provides async filesystem primitives.")
-    (license (list license:asl2.0 license:expat))))
+                                   ("rust-winapi" ,rust-winapi-0.3))))))
 
 (define-public rust-async-global-executor-2
   (package
-- 
2.41.0