Subject: [PATCH] gnu: Add sqlitebrowser.
From: Zhu Zihao <[email-masked]>
To: [email-masked]
Date: Sat, 01 Jan 2022 18:23:59 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

From d75eb814e3b7c214218bef2dc9cc5960fb2e5f3f Mon Sep 17 00:00:00 2001
From: Zhu Zihao <[email-masked]>
Date: Sat, 1 Jan 2022 14:48:07 +0800
Subject: [PATCH] gnu: Add sqlitebrowser.

* gnu/packages/databases.scm (sqlitebrowser): New variable.
---
 gnu/packages/databases.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index e81d4f0e74..4b7ae6f251 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -54,6 +54,7 @@
 ;;; Copyright © 2021 Alexandre Hannud Abdo <[email-masked]>
 ;;; Copyright © 2021 Simon Tournier <[email-masked]>
 ;;; Copyright © 2021 jgart <[email-masked]>
+;;; Copyright © 2022 Zhu Zihao <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -130,6 +131,7 @@ (define-module (gnu packages databases)
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages regex)
@@ -165,6 +167,7 @@ (define-module (gnu packages databases)
   #:use-module (guix build-system ruby)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system scons)
+  #:use-module (guix build-system qt)
   #:use-module (guix build-system trivial)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
@@ -4160,3 +4163,33 @@ (define-public sequeler
 a Gtk.Grid Widget.")
     (home-page "https://github.com/Alecaddd/sequeler")
     (license license:gpl2+)))
+
+(define-public sqlitebrowser
+  (package
+    (name "sqlitebrowser")
+    (version "3.12.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sqlitebrowser/sqlitebrowser")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "1ljqzcx388mmni8lv9jz5r58alhsjrrqi4nzjnbfki94rn4ray6z"))
+       (file-name (git-file-name name version))))
+    (build-system qt-build-system)
+    (arguments
+     (list #:tests? #f                  ; no tests
+           #:configure-flags
+           ;; TODO: Unbundle QHexEdit, QScintilla.
+           #~(list "-DFORCE_INTERNAL_QCUSTOMPLOT=OFF")))
+    (inputs (list qtbase-5 qcustomplot sqlite))
+    (native-inputs (list qttools))
+    (home-page "https://sqlitebrowser.org/")
+    (synopsis "Database browser for SQLite")
+    (description "Sqlitebrowser is a high quaility, visual, open source tool to
+create design, and edit database file compatible with SQLite.")
+    (license
+     ;; dual license
+     (list license:gpl3+
+           license:mpl2.0))))
-- 
2.34.0

-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao