Subject: [bug#66805] [PATCH 14/22] gnu: Add rust-git2-0.18.

From: Jaeme Sifat <[email-masked]>
Date: Sun, 29 Oct 2023 00:27:06 -0400

* gnu/packages/crates-io.scm (rust-git2-0.18): New variable.

Signed-off-by: Jaeme Sifat <[email-masked]>
Change-Id: I2623e46c5da798c0793a7ddc48685964eb5d56e1
---
 gnu/packages/crates-io.scm | 50 +++++++++++++++++++++++++++-----------
 1 file changed, 36 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ab1641279c..95346b3764 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -29165,8 +29165,43 @@ (define-public rust-git-version-macro-0.3
      "This is an internal macro crate for git-version.")
     (license license:bsd-2)))
 
+(define-public rust-git2-0.18
+  (package
+    (name "rust-git2")
+    (version "0.18.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "git2" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1kf0kvg3i7p1223zs2h9fz99ndm0l9kdx3hcw63g73dh5nlppygv"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-bitflags" ,rust-bitflags-2)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-libgit2-sys" ,rust-libgit2-sys-0.16)
+                       ("rust-log" ,rust-log-0.4)
+                       ("rust-openssl-probe" ,rust-openssl-probe-0.1)
+                       ("rust-openssl-sys" ,rust-openssl-sys-0.9)
+                       ("rust-url" ,rust-url-2))
+       #:cargo-development-inputs (("rust-structopt" ,rust-structopt-0.3)
+                                   ("rust-tempfile" ,rust-tempfile-3)
+                                   ("rust-time" ,rust-time-0.1))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("git" ,git-minimal))) ;for a single test
+    (inputs (list libgit2 libssh2 openssl zlib))
+    (home-page "https://github.com/rust-lang/git2-rs")
+    (synopsis "Rust bindings to libgit2")
+    (description
+     "This package provides bindings to libgit2 for interoperating with git
+repositories.  This library is both threadsafe and memory safe and allows both
+reading and writing git repositories.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-git2-0.16
   (package
+    (inherit rust-git2-0.18)
     (name "rust-git2")
     (version "0.16.1")
     (source
@@ -29177,7 +29212,6 @@ (define-public rust-git2-0.16
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "1k1aavsfhk0i9jycc9gb61w2jwy8w9dgkd7zkz295wwm566gdxyc"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
        (("rust-bitflags" ,rust-bitflags-1)
@@ -29191,19 +29225,7 @@ (define-public rust-git2-0.16
        (("rust-paste" ,rust-paste-1)
         ("rust-structopt" ,rust-structopt-0.3)
         ("rust-tempfile" ,rust-tempfile-3)
-        ("rust-time" ,rust-time-0.1))))
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("git" ,git-minimal)))           ;for a single test
-    (inputs
-     (list libgit2 libssh2 openssl zlib))
-    (home-page "https://github.com/rust-lang/git2-rs")
-    (synopsis "Rust bindings to libgit2")
-    (description
-     "This package provides bindings to libgit2 for interoperating with git
-repositories.  This library is both threadsafe and memory safe and allows both
-reading and writing git repositories.")
-    (license (list license:expat license:asl2.0))))
+        ("rust-time" ,rust-time-0.1))))))
 
 (define-public rust-git2-0.15
   (package
-- 
2.34.1