Subject: [bug#70317] [PATCH 07/13] gnu: packages: Add go-git-sr-ht-emersion-go-sqlite3-fts5

From: Jesse Eisses <[email-masked]>
Date: Wed, 10 Apr 2024 10:10:02 +0200

Change-Id: I921cab70edb4b726d3f0145470d2d2b3092bd6c1
---
 gnu/packages/golang-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index a563fe2aab..2ee165e012 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -2952,6 +2952,38 @@ (define-public go-github-com-xhit-go-str2duration-v2
 similar string with weeks or days too.")
     (license license:bsd-3)))
 
+(define-public go-git-sr-ht-emersion-go-sqlite3-fts5
+  (package
+    (name "go-git-sr-ht-emersion-go-sqlite3-fts5")
+    (version "0.0.0-20230217131031-f2c8767594fc")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.sr.ht/~emersion/go-sqlite3-fts5")
+             (commit "f2c8767594fc")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "07wj4ypmfn8gmbg08bah3vrn6f2jbcfp47nlraw304rwpxflw05h"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:go ,go-1.18
+       #:import-path "git.sr.ht/~emersion/go-sqlite3-fts5"
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'set-flags
+                    (lambda _
+                      ;; Make sure CMake picks Clang as compiler
+                      (begin
+                        (setenv "CGO_LDFLAGS"
+                         "-Wl,--unresolved-symbols=ignore-in-object-files") #t))))))
+    (propagated-inputs
+     `(("go-github-com-mattn-go-sqlite3" ,go-github-com-mattn-go-sqlite3)))
+    (home-page "https://git.sr.ht/~emersion/go-sqlite3-fts5")
+    (synopsis "Standalone FTS5 extension for go-sqlite3")
+    (description "Standalone FTS5 extension for
+@@url{https://github.com/mattn/go-sqlite3,go-sqlite3}.")
+    (license license:expat)))
+
 (define-public go-go-uber-org-automaxprocs
   (package
     (name "go-go-uber-org-automaxprocs")
-- 
2.41.0