Subject: [PATCH 19/20] gnu: rust-libgit2-sys: Update to 0.16.1+1.7.1.

From: Rémi Teissier <[email-masked]>
Date: Tue, 12 Dec 2023 22:16:57 +0100

Change-Id: I683fd8785dda47fecb07809e50b69aa872ad37c7
---
 gnu/packages/crates-io.scm | 71 ++++++++++++++++++++++++++++++++++----
 1 file changed, 64 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index db0ec90a658..23d106464c6 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -37191,8 +37191,71 @@ (define-public rust-libfuzzer-sys-0.3
     (license
      (list license:expat license:asl2.0 license:ncsa))))
 
+(define-public rust-libgit2-sys-0.16
+  (package
+    (name "rust-libgit2-sys")
+    (version "0.16.1+1.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "libgit2-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "030dnq7hz79qs4rxdllc3ailvqzc432jwwxk7g8av55hh0vbp8pj"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   (delete-file-recursively "libgit2")))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-cc" ,rust-cc-1)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-libssh2-sys" ,rust-libssh2-sys-0.3)
+                       ("rust-libz-sys" ,rust-libz-sys-1)
+                       ("rust-openssl-sys" ,rust-openssl-sys-0.9)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))))
+    (native-inputs (list pkg-config))
+    (inputs (list libgit2 openssl zlib))
+    (home-page "https://github.com/rust-lang/git2-rs")
+    (synopsis "Native bindings to the libgit2 library")
+    (description
+     "This package provides native Rust bindings to the @code{libgit2}
+library.")
+    (license (list license:expat license:asl2.0))))
+
+(define-public rust-libgit2-sys-0.15
+  (package
+    (inherit rust-libgit2-sys-0.16)
+    (name "rust-libgit2-sys")
+    (version "0.15.2+1.6.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "libgit2-sys" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1yllyq9wiryy257cfx8s7wadls24yzkxnhmbl95iz9ml3zhz43d8"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin (delete-file-recursively "libgit2")))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-cc" ,rust-cc-1)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-libssh2-sys" ,rust-libssh2-sys-0.3)
+        ("rust-libz-sys" ,rust-libz-sys-1)
+        ("rust-openssl-sys" ,rust-openssl-sys-0.9)
+        ("rust-pkg-config" ,rust-pkg-config-0.3))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list libgit2-1.6 openssl zlib))))
+
 (define-public rust-libgit2-sys-0.14
   (package
+    (inherit rust-libgit2-sys-0.15)
     (name "rust-libgit2-sys")
     (version "0.14.2+1.5.1")
     (source
@@ -37219,13 +37282,7 @@ (define-public rust-libgit2-sys-0.14
     (native-inputs
      (list pkg-config))
     (inputs
-     (list libgit2 openssl zlib))
-    (home-page "https://github.com/rust-lang/git2-rs")
-    (synopsis "Native bindings to the libgit2 library")
-    (description
-     "This package provides native Rust bindings to the @code{libgit2}
-library.")
-    (license (list license:expat license:asl2.0))))
+     (list libgit2-1.5 openssl zlib))))
 
 (define-public rust-libgit2-sys-0.13
   (package
-- 
2.41.0