From: Foo Chuan Wei <chuanwei.foo@hotmail.com>
To: 52000@debbugs.gnu.org
Subject: [bug#52000] [PATCH 2/2] gnu: Add sqlitebrowser.
Date: Sat, 20 Nov 2021 15:44:52 +0000 [thread overview]
Message-ID: <PU1PR01MB2155EDB08E52C857594B4B768D9D9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <PU1PR01MB2155C908FC5C1D89628553048D9D9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com>
* gnu/packages/databases.scm (sqlitebrowser): New variable.
---
gnu/packages/databases.scm | 91 ++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 5edc4e2cce..ca801489be 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -54,6 +54,7 @@
;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -130,6 +131,7 @@
#: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)
@@ -4098,6 +4100,95 @@ PostreSQL, SQLite, ODBC and MySQL.")
connecting to MS SQL and Sybase servers over TCP/IP.")
(license license:lgpl2.0+)))
+(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))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1ljqzcx388mmni8lv9jz5r58alhsjrrqi4nzjnbfki94rn4ray6z"))
+ ;; Remove bundled libraries.
+ (modules '((guix build utils)))
+ (snippet '(delete-file-recursively "libs"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DENABLE_TESTING=ON"
+ ;; Force the use of non-bundled libraries.
+ "-DFORCE_INTERNAL_QSCINTILLA=OFF"
+ "-DFORCE_INTERNAL_QHEXEDIT=OFF"
+ "-DFORCE_INTERNAL_QCUSTOMPLOT=OFF")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "CMakeLists.txt"
+ (("^ find_package\\(QScintilla 2.8.10 QUIET\\)" all)
+ (string-append
+ all "\n"
+ " set(QSCINTILLA_FOUND TRUE)\n"
+ " set(QSCINTILLA_INCLUDE_DIR "
+ (assoc-ref inputs "qscintilla") "/include)"))
+ (("^ find_package\\(QHexEdit\\)" all)
+ (string-append
+ all "\n"
+ " set(QHexEdit_FOUND TRUE)\n"
+ " set(QHexEdit_INCLUDE_DIR "
+ (assoc-ref inputs "qhexedit") "/include)"))
+ (("^set\\(JSON_DIR libs/json\\)")
+ (string-append "set(JSON_DIR "
+ (assoc-ref inputs "json-modern-cxx") "/include)"))
+ (("^add_subdirectory\\(\\$\\{JSON_DIR\\}\\)") ; No need to build.
+ ""))
+
+ (substitute* '("src/EditDialog.cpp"
+ "src/ExportDataDialog.cpp"
+ "src/RemoteCommitsModel.h"
+ "src/RemoteDock.cpp"
+ "src/RemoteLocalFilesModel.h"
+ "src/RemoteModel.h"
+ "src/RemoteNetwork.cpp"
+ "src/RemotePushDialog.cpp"
+ "src/sqlitedb.cpp"
+ "src/sqlitetablemodel.cpp")
+ (("^#include <json.hpp>")
+ "#include <nlohmann/json.hpp>"))
+
+ ;; Fix compilation error:
+ ;; "no matching function for call to ‘input_adapter(const QByteArray&)’"
+ (substitute* "src/EditDialog.cpp"
+ (("auto json_parse_result = json::parse\\(cellData, nullptr, false\\);")
+ "auto json_parse_result = json::parse(cellData.toStdString(), nullptr, false);"))
+ (substitute* '("src/RemoteDock.cpp"
+ "src/RemotePushDialog.cpp")
+ (("json obj = json::parse\\(reply, nullptr, false\\);")
+ "json obj = json::parse(reply.toStdString(), nullptr, false);"))
+ (substitute* "src/RemoteNetwork.cpp"
+ (("json obj = json::parse\\(reply->readAll\\(\\), nullptr, false\\);")
+ "json obj = json::parse((reply->readAll()).toStdString(), nullptr, false);")))))))
+ (native-inputs
+ `(("json-modern-cxx" ,json-modern-cxx)
+ ("qcustomplot" ,qcustomplot)
+ ("qhexedit" ,qhexedit)
+ ("qscintilla" ,qscintilla)
+ ("qtbase" ,qtbase-5)
+ ("qttools" ,qttools)
+ ("sqlite" ,sqlite)))
+ (home-page "https://sqlitebrowser.org")
+ (synopsis "GUI editor for SQLite databases")
+ (description
+ "DB Browser for SQLite (DB4S) is a visual tool to create, design, and edit
+database files compatible with SQLite. DB4S is for users and developers who
+want to create, search, and edit databases using a familiar spreadsheet-like
+interface, without needing to learn complicated SQL commands.")
+ ;; Dual licensing.
+ (license (list license:gpl3+ license:mpl2.0))))
+
(define-public sequeler
(package
(name "sequeler")
--
2.25.1
next prev parent reply other threads:[~2021-11-20 15:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-20 15:37 [bug#52000] [PATCH 0/2] gnu: Add sqlitebrowser Foo Chuan Wei
2021-11-20 15:40 ` [bug#52000] [PATCH 1/2] gnu: Add qhexedit Foo Chuan Wei
2021-11-20 15:44 ` Foo Chuan Wei [this message]
2021-11-21 10:36 ` [bug#52000] [PATCH v2 " Foo Chuan Wei
2021-11-21 10:39 ` [bug#52000] [PATCH v2 2/2] gnu: Add sqlitebrowser Foo Chuan Wei
2022-01-15 4:22 ` [bug#52000] [PATCH v3 1/2] gnu: Add qhexedit Foo Chuan Wei
2022-02-21 13:51 ` bug#52000: " Guillaume Le Vaillant
2022-01-15 4:24 ` [bug#52000] [PATCH v3 2/2] gnu: Add sqlitebrowser Foo Chuan Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PU1PR01MB2155EDB08E52C857594B4B768D9D9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com \
--to=chuanwei.foo@hotmail.com \
--cc=52000@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).