diff mbox series

[bug#44762,27/37] gnu: Add rust-libsqlite3-sys-0.18.

Message ID 20201120142716.41949-27-joseph@lafreniere.xyz
State New
Headers show
Series gnu: Add ripgrep-all. | expand

Checks

Context Check Description
cbaines/issue success View issue
cbaines/applying patch success View Laminar job
cbaines/git branch success View Git branch
cbaines/comparison success View comparision
cbaines/submitting builds success
cbaines/submitting builds success

Commit Message

Joseph LaFreniere Nov. 20, 2020, 2:27 p.m. UTC
* gnu/packages/crates-io.scm (rust-libsqlite3-sys-0.18): New variable.
---
 gnu/packages/crates-io.scm | 41 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 894ade42fa..30f7c1fb7f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -13933,6 +13933,47 @@  allocator.")
     (license (list license:asl2.0
                    license:expat))))
 
+(define-public rust-libsqlite3-sys-0.18
+  (package
+    (name "rust-libsqlite3-sys")
+    (version "0.18.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "libsqlite3-sys" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1ggpbnis0rci97ln628y2v6pkgfhb6zgc8rsp444mkdfph14lw0y"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Enable unstable features
+           (substitute* "src/lib.rs"
+             (("#!\\[allow\\(non_snake_case, non_camel_case_types\\)\\]" all)
+              (string-append "#![feature(non_exhaustive)]\n" all)))))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       ;; build-dependencies
+       (("rust-bindgen" ,rust-bindgen-0.53)
+        ("rust-cc" ,rust-cc-1)
+        ("rust-pkg-config" ,rust-pkg-config-0.3)
+        ("rust-vcpkg" ,rust-vcpkg-0.2))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'enable-unstable-features
+           (lambda _
+             (setenv "RUSTC_BOOTSTRAP" "1")
+             #t)))))
+    (inputs
+     `(("sqlite" ,sqlite)))
+    (home-page "https://github.com/rusqlite/rusqlite")
+    (synopsis "Native bindings to the libsqlite3 library")
+    (description "Native bindings to the libsqlite3 library")
+    (license license:expat)))
+
 (define-public rust-libsqlite3-sys-0.15
   (package
     (name "rust-libsqlite3-sys")