summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-10-25 10:01:19 +0300
committerEfraim Flashner <efraim@flashner.co.il>2023-11-28 07:58:43 +0200
commitd362f60d3dc8ceafaa4a0501bcab39975462e8bb (patch)
treed69313e02d48c748b78874d33fd803a407085f03
parent2ec6db456b142b8579919db613efcd2a4654f5b5 (diff)
downloadguix-d362f60d3dc8ceafaa4a0501bcab39975462e8bb.tar.gz
gnu: Add rust-sqlite3-src-0.5.
* gnu/packages/crates-io.scm (rust-sqlite3-src-0.5): New variable.
(rust-sqlite3-src-0.3): Inherit from rust-sqlite3-src-0.5.

Change-Id: I908cacf5ace18b7c43b37ae5ac557eea231f9369
-rw-r--r--gnu/packages/crates-io.scm39
1 files changed, 33 insertions, 6 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 09b93291eb..6d9d51ee82 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -70714,27 +70714,54 @@ OIDs)")
     (description "The package provides an interface to SQLite.")
     (license (list license:asl2.0 license:expat))))
 
-(define-public rust-sqlite3-src-0.3
+(define-public rust-sqlite3-src-0.5
   (package
     (name "rust-sqlite3-src")
-    (version "0.3.0")
+    (version "0.5.1")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "sqlite3-src" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "18ygmfcpkccs8s9m5s9q31rrx1mrdps387w9yp3481jswxyb0q52"))))
+        (base32 "0m74wrkpify3z0xvrw4i2yssn9m9sjwqa5ipk6aq6f7fl58mmjdz"))
+       (snippet
+        #~(begin (use-modules (guix build utils))
+                 ;; Only allow for linking to system sqlite3.
+                 (delete-file-recursively "source")
+                 (delete-file "build.rs")
+                 (with-output-to-file "build.rs"
+                   (lambda _
+                     (format #t "fn main (){~@
+                             println!(\"cargo:rustc-link-lib=sqlite3\");~@
+                             }~%")))))))
     (build-system cargo-build-system)
     (arguments
-     `(#:cargo-inputs
-       (("rust-cc" ,rust-cc-1)
-        ("rust-pkg-config" ,rust-pkg-config-0.3))))
+     `(#:cargo-inputs (("rust-cc" ,rust-cc-1)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))))
+    (inputs (list sqlite))
     (home-page "https://github.com/stainless-steel/sqlite3-src")
     (synopsis "Provider of SQLite")
     (description "The package provides SQLite.")
     (license (list license:asl2.0 license:expat))))
 
+(define-public rust-sqlite3-src-0.3
+  (package
+    (inherit rust-sqlite3-src-0.5)
+    (name "rust-sqlite3-src")
+    (version "0.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "sqlite3-src" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "18ygmfcpkccs8s9m5s9q31rrx1mrdps387w9yp3481jswxyb0q52"))))
+    (arguments
+     `(#:cargo-inputs
+       (("rust-cc" ,rust-cc-1)
+        ("rust-pkg-config" ,rust-pkg-config-0.3))))))
+
 (define-public rust-sqlite3-sys-0.15
   (package
     (name "rust-sqlite3-sys")