Subject: [bug#66805] [PATCH 13/22] gnu: Add rust-libgit2-sys-0.16.

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

This patch also adds gexps to the libgit2 snippet and cleans up the package
definitions.

* gnu/packages/crates-io.scm (rust-libgit2-sys-0.16): New variable.
* gnu/packages/crates-io.scm (rust-libgit2-sys-0.6): Fix name field.

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

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 669baf7245..ab1641279c 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -37131,35 +37131,30 @@ (define-public rust-libfuzzer-sys-0.3
     (license
      (list license:expat license:asl2.0 license:ncsa))))
 
-(define-public rust-libgit2-sys-0.14
+(define-public rust-libgit2-sys-0.16
   (package
     (name "rust-libgit2-sys")
-    (version "0.14.2+1.5.1")
+    (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"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "1926x5f84ykr8j2lsdmb0n0bj4jz173j5bm722cgwx8hnpv9agbz"))
+        (base32 "030dnq7hz79qs4rxdllc3ailvqzc432jwwxk7g8av55hh0vbp8pj"))
        (modules '((guix build utils)))
-       (snippet
-        '(begin (delete-file-recursively "libgit2")))))
+       (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.2)
-        ("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))
+     `(#: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
@@ -37167,6 +37162,30 @@ (define-public rust-libgit2-sys-0.14
 library.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-libgit2-sys-0.14
+  (package
+    (inherit rust-libgit2-sys-0.16)
+    (name "rust-libgit2-sys")
+    (version "0.14.2+1.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "libgit2-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1926x5f84ykr8j2lsdmb0n0bj4jz173j5bm722cgwx8hnpv9agbz"))
+       (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.2)
+                       ("rust-libz-sys" ,rust-libz-sys-1)
+                       ("rust-openssl-sys" ,rust-openssl-sys-0.9)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))))))
+
 (define-public rust-libgit2-sys-0.13
   (package
     (inherit rust-libgit2-sys-0.14)
@@ -37176,24 +37195,20 @@ (define-public rust-libgit2-sys-0.13
      (origin
        (method url-fetch)
        (uri (crate-uri "libgit2-sys" version))
-       (file-name
-        (string-append name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "1fkdgfqdkd38hfsyw3znq629gp7wdknzslym5l0g29k9q83fmrai"))
+        (base32 "1fkdgfqdkd38hfsyw3znq629gp7wdknzslym5l0g29k9q83fmrai"))
        (modules '((guix build utils)))
-       (snippet
-        '(begin (delete-file-recursively "libgit2")))))
+       (snippet #~'(begin
+                     (delete-file-recursively "libgit2")))))
     (arguments
-     `(#:cargo-inputs
-       (("rust-cc" ,rust-cc-1)
-        ("rust-libc" ,rust-libc-0.2)
-        ("rust-libssh2-sys" ,rust-libssh2-sys-0.2)
-        ("rust-libz-sys" ,rust-libz-sys-1)
-        ("rust-openssl-sys" ,rust-openssl-sys-0.9)
-        ("rust-pkg-config" ,rust-pkg-config-0.3))))
-    (inputs
-     (list libgit2-1.4 openssl zlib))))
+     `(#:cargo-inputs (("rust-cc" ,rust-cc-1)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-libssh2-sys" ,rust-libssh2-sys-0.2)
+                       ("rust-libz-sys" ,rust-libz-sys-1)
+                       ("rust-openssl-sys" ,rust-openssl-sys-0.9)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))))
+    (inputs (list libgit2-1.4 openssl zlib))))
 
 (define-public rust-libgit2-sys-0.12
   (package
@@ -37204,22 +37219,19 @@ (define-public rust-libgit2-sys-0.12
      (origin
        (method url-fetch)
        (uri (crate-uri "libgit2-sys" version))
-       (file-name
-        (string-append name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "153l8nvz9p8vyd5840xi6fwblvhpn3c33jwdwsznyq4f4jcwiq8r"))
+        (base32 "153l8nvz9p8vyd5840xi6fwblvhpn3c33jwdwsznyq4f4jcwiq8r"))
        (modules '((guix build utils)))
-       (snippet
-        '(begin (delete-file-recursively "libgit2")))))
+       (snippet #~'(begin
+                     (delete-file-recursively "libgit2")))))
     (arguments
-     `(#:cargo-inputs
-       (("rust-cc" ,rust-cc-1)
-        ("rust-libc" ,rust-libc-0.2)
-        ("rust-libssh2-sys" ,rust-libssh2-sys-0.2)
-        ("rust-libz-sys" ,rust-libz-sys-1)
-        ("rust-openssl-sys" ,rust-openssl-sys-0.9)
-        ("rust-pkg-config" ,rust-pkg-config-0.3))))))
+     `(#:cargo-inputs (("rust-cc" ,rust-cc-1)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-libssh2-sys" ,rust-libssh2-sys-0.2)
+                       ("rust-libz-sys" ,rust-libz-sys-1)
+                       ("rust-openssl-sys" ,rust-openssl-sys-0.9)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))))))
 
 (define-public rust-libgit2-sys-0.10
   (package
@@ -37232,20 +37244,18 @@ (define-public rust-libgit2-sys-0.10
        (uri (crate-uri "libgit2-sys" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "0l9fvki7qxsl97vgzqwlv75nl213a5vxw7b1jaik97ala356pv6r"))
+        (base32 "0l9fvki7qxsl97vgzqwlv75nl213a5vxw7b1jaik97ala356pv6r"))
        (modules '((guix build utils)))
-       (snippet
-        '(begin (delete-file-recursively "libgit2") #t))))
+       (snippet #~'(begin
+                     (delete-file-recursively "libgit2") #t))))
     (arguments
-     `(#:cargo-inputs
-       (("rust-libc" ,rust-libc-0.2)
-        ("rust-libz-sys" ,rust-libz-sys-1)
-        ("rust-libssh2-sys" ,rust-libssh2-sys-0.2)
-        ("rust-openssl-sys" ,rust-openssl-sys-0.9)
-        ;; Build dependencies:
-        ("rust-cc" ,rust-cc-1)
-        ("rust-pkg-config" ,rust-pkg-config-0.3))))))
+     `(#:cargo-inputs (("rust-libc" ,rust-libc-0.2)
+                       ("rust-libz-sys" ,rust-libz-sys-1)
+                       ("rust-libssh2-sys" ,rust-libssh2-sys-0.2)
+                       ("rust-openssl-sys" ,rust-openssl-sys-0.9)
+                       ;; Build dependencies:
+                       ("rust-cc" ,rust-cc-1)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))))))
 
 (define-public rust-libgit2-sys-0.8
   (package
@@ -37253,21 +37263,20 @@ (define-public rust-libgit2-sys-0.8
     (name "rust-libgit2-sys")
     (version "0.8.2")
     (source
-      (origin
-        (method url-fetch)
-        (uri (crate-uri "libgit2-sys" version))
-        (file-name (string-append name "-" version ".tar.gz"))
-        (sha256
-         (base32
-          "0y2mibmx7wy91s2kmb2gfb29mrqlqaxpy5wcwr8s1lwws7b9w5sc"))
-        (modules '((guix build utils)))
-        (snippet
-         '(begin (delete-file-recursively "libgit2") #t))))))
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "libgit2-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0y2mibmx7wy91s2kmb2gfb29mrqlqaxpy5wcwr8s1lwws7b9w5sc"))
+       (modules '((guix build utils)))
+       (snippet #~'(begin
+                     (delete-file-recursively "libgit2") #t))))))
 
 (define-public rust-libgit2-sys-0.6
   (package
     (inherit rust-libgit2-sys-0.10)
-    (name "rust-libgit2-sys-6")
+    (name "rust-libgit2-sys")
     (version "0.6.19")
     (source
      (origin
@@ -37277,15 +37286,14 @@ (define-public rust-libgit2-sys-0.6
        (sha256
         (base32 "0myk79sxqj20bmj4ir3p81xnma9qnid5rrmlbkj5v68wgdpfdskf"))))
     (arguments
-     `(#:cargo-inputs
-       (("rust-cc" ,rust-cc-1)
-        ("rust-cmake" ,rust-cmake-0.1)
-        ("rust-curl-sys" ,rust-curl-sys-0.4)
-        ("rust-libc" ,rust-libc-0.2)
-        ("rust-libssh2-sys" ,rust-libssh2-sys-0.2)
-        ("rust-libz-sys" ,rust-libz-sys-1)
-        ("rust-openssl-sys" ,rust-openssl-sys-0.9)
-        ("rust-pkg-config" ,rust-pkg-config-0.3))))))
+     `(#:cargo-inputs (("rust-cc" ,rust-cc-1)
+                       ("rust-cmake" ,rust-cmake-0.1)
+                       ("rust-curl-sys" ,rust-curl-sys-0.4)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-libssh2-sys" ,rust-libssh2-sys-0.2)
+                       ("rust-libz-sys" ,rust-libz-sys-1)
+                       ("rust-openssl-sys" ,rust-openssl-sys-0.9)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))))))
 
 (define-public rust-libloading-0.7
   (package
-- 
2.34.1