GNU bug report logs - #52000
[PATCH 0/2] gnu: Add sqlitebrowser.

Previous Next

Package: guix-patches;

Reported by: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>

Date: Sat, 20 Nov 2021 15:38:01 UTC

Severity: normal

Tags: patch

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52000 in the body.
You can then email your comments to 52000 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#52000; Package guix-patches. (Sat, 20 Nov 2021 15:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Foo Chuan Wei <chuanwei.foo <at> hotmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 20 Nov 2021 15:38:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] gnu: Add sqlitebrowser.
Date: Sat, 20 Nov 2021 15:37:38 +0000
This patch series adds sqlitebrowser. There have been two previous
patches [1] [2] that were not accepted into Guix because they did not
unbundle the third-party libraries bundled with sqlitebrowser. This
patch does not use the bundled libraries.

[1]: https://issues.guix.gnu.org/34612
[2]: https://issues.guix.gnu.org/47640

Foo Chuan Wei (2):
  gnu: Add qhexedit.
  gnu: Add sqlitebrowser.

 gnu/packages/databases.scm | 91 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/qt.scm        | 46 +++++++++++++++++++
 2 files changed, 137 insertions(+)


base-commit: 5b96e9651029d68c17a05e9ca75b25a0f129ecca
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#52000; Package guix-patches. (Sat, 20 Nov 2021 15:41:02 GMT) Full text and rfc822 format available.

Message #8 received at 52000 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 52000 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add qhexedit.
Date: Sat, 20 Nov 2021 15:40:39 +0000
* gnu/packages/qt.scm (qhexedit): New variable.
---
 gnu/packages/qt.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4625d2220d..a645875456 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2021 Brendan Tildesley <mail <at> brendan.scot>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo <at> nixo.xyz>
+;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3065,6 +3066,51 @@ being fully customizable and easy to extend.")
     ;; be used.
     (license (list license:gpl2 license:gpl3))))
 
+(define-public qhexedit
+  (package
+    (name "qhexedit")
+    (version "0.8.9")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Simsys/qhexedit2")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-path
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "src/qhexedit.pro"
+               (("^unix:DESTDIR = /usr/lib")
+                (string-append "unix:DESTDIR = "
+                               (assoc-ref outputs "out") "/lib")))))
+         (replace 'configure
+           (lambda _
+             (chdir "src")
+             (invoke "qmake" "qhexedit.pro")))
+         (add-after 'install 'install-headers
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (include-dir (string-append out "/include")))
+               (mkdir-p include-dir)
+               (for-each (lambda (file)
+                           (install-file file include-dir))
+                         (find-files "." "\\.h$"))))))))
+    (native-inputs
+     `(("qtbase" ,qtbase-5)
+       ("qttools" ,qttools)))
+    (home-page "https://simsys.github.io")
+    (synopsis "Binary editor widget for Qt")
+    (description
+     "@code{QHexEdit} is a hex editor widget for the Qt framework.  It is a
+simple editor for binary data, just like @code{QPlainTextEdit} is for text
+data.")
+    (license license:lgpl2.1)))
 
 (define-public soqt
   (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#52000; Package guix-patches. (Sat, 20 Nov 2021 15:46:02 GMT) Full text and rfc822 format available.

Message #11 received at 52000 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 52000 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Add sqlitebrowser.
Date: Sat, 20 Nov 2021 15:44:52 +0000
* 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 <at> member.fsf.org>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
+;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#52000; Package guix-patches. (Sun, 21 Nov 2021 10:38:02 GMT) Full text and rfc822 format available.

Message #14 received at 52000 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 52000 <at> debbugs.gnu.org
Subject: [PATCH v2 1/2] gnu: Add qhexedit.
Date: Sun, 21 Nov 2021 10:36:52 +0000
* gnu/packages/qt.scm (qhexedit): New variable.
---
Changes relative to PATCH v1:
* Move qtbase-5 from native-inputs to inputs.

 gnu/packages/qt.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4625d2220d..fb783d356e 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2021 Brendan Tildesley <mail <at> brendan.scot>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo <at> nixo.xyz>
+;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3065,6 +3066,52 @@ being fully customizable and easy to extend.")
     ;; be used.
     (license (list license:gpl2 license:gpl3))))
 
+(define-public qhexedit
+  (package
+    (name "qhexedit")
+    (version "0.8.9")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Simsys/qhexedit2")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-path
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "src/qhexedit.pro"
+               (("^unix:DESTDIR = /usr/lib")
+                (string-append "unix:DESTDIR = "
+                               (assoc-ref outputs "out") "/lib")))))
+         (replace 'configure
+           (lambda _
+             (chdir "src")
+             (invoke "qmake" "qhexedit.pro")))
+         (add-after 'install 'install-headers
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (include-dir (string-append out "/include")))
+               (mkdir-p include-dir)
+               (for-each (lambda (file)
+                           (install-file file include-dir))
+                         (find-files "." "\\.h$"))))))))
+    (inputs
+     `(("qtbase" ,qtbase-5)))
+    (native-inputs
+     `(("qttools" ,qttools)))
+    (home-page "https://simsys.github.io")
+    (synopsis "Binary editor widget for Qt")
+    (description
+     "@code{QHexEdit} is a hex editor widget for the Qt framework.  It is a
+simple editor for binary data, just like @code{QPlainTextEdit} is for text
+data.")
+    (license license:lgpl2.1)))
 
 (define-public soqt
   (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")

base-commit: 9bfbba8af5b7efb952292c8b7d5e9ee57300c2bc
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#52000; Package guix-patches. (Sun, 21 Nov 2021 10:40:01 GMT) Full text and rfc822 format available.

Message #17 received at 52000 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 52000 <at> debbugs.gnu.org
Subject: [PATCH v2 2/2] gnu: Add sqlitebrowser.
Date: Sun, 21 Nov 2021 10:39:08 +0000
* gnu/packages/databases.scm (sqlitebrowser): New variable.
---
Changes relative to PATCH v1:
* Move libraries from native-inputs to inputs.
* Reduce the length of some long string arguments given to substitute*.

 gnu/packages/databases.scm | 92 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 5edc4e2cce..ab7b31392e 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -54,6 +54,7 @@
 ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo <at> member.fsf.org>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
+;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> 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,96 @@ 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"
+               (("json::parse\\(cellData, nullptr, false\\)")
+                "json::parse(cellData.toStdString(), nullptr, false)"))
+             (substitute* '("src/RemoteDock.cpp"
+                            "src/RemotePushDialog.cpp")
+               (("json::parse\\(reply, nullptr, false\\)")
+                "json::parse(reply.toStdString(), nullptr, false)"))
+             (substitute* "src/RemoteNetwork.cpp"
+               (("json::parse\\(reply->readAll\\(\\), nullptr, false\\)")
+                "json::parse((reply->readAll()).toStdString(), nullptr, false)")))))))
+    (inputs
+     `(("json-modern-cxx" ,json-modern-cxx)
+       ("qcustomplot" ,qcustomplot)
+       ("qhexedit" ,qhexedit)
+       ("qscintilla" ,qscintilla)
+       ("qtbase" ,qtbase-5)
+       ("sqlite" ,sqlite)))
+    (native-inputs
+     `(("qttools" ,qttools)))
+    (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





Information forwarded to guix-patches <at> gnu.org:
bug#52000; Package guix-patches. (Sat, 15 Jan 2022 04:24:02 GMT) Full text and rfc822 format available.

Message #20 received at 52000 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 52000 <at> debbugs.gnu.org
Subject: [PATCH v3 1/2] gnu: Add qhexedit.
Date: Sat, 15 Jan 2022 04:22:44 +0000
* gnu/packages/qt.scm (qhexedit): New variable.
---
Changes relative to PATCH v2:
* Replace old-style inputs with new-style inputs.
* Update copyright year.

 gnu/packages/qt.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 01bf961bbf..223304822a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2021 Brendan Tildesley <mail <at> brendan.scot>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo <at> nixo.xyz>
+;;; Copyright © 2022 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3004,6 +3005,50 @@ being fully customizable and easy to extend.")
     ;; be used.
     (license (list license:gpl2 license:gpl3))))
 
+(define-public qhexedit
+  (package
+    (name "qhexedit")
+    (version "0.8.9")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Simsys/qhexedit2")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-path
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "src/qhexedit.pro"
+               (("^unix:DESTDIR = /usr/lib")
+                (string-append "unix:DESTDIR = "
+                               (assoc-ref outputs "out") "/lib")))))
+         (replace 'configure
+           (lambda _
+             (chdir "src")
+             (invoke "qmake" "qhexedit.pro")))
+         (add-after 'install 'install-headers
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (include-dir (string-append out "/include")))
+               (mkdir-p include-dir)
+               (for-each (lambda (file)
+                           (install-file file include-dir))
+                         (find-files "." "\\.h$"))))))))
+    (inputs (list qtbase-5))
+    (native-inputs (list qttools))
+    (home-page "https://simsys.github.io")
+    (synopsis "Binary editor widget for Qt")
+    (description
+     "@code{QHexEdit} is a hex editor widget for the Qt framework.  It is a
+simple editor for binary data, just like @code{QPlainTextEdit} is for text
+data.")
+    (license license:lgpl2.1)))
 
 (define-public soqt
   (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")

base-commit: 3c43f2b4f54dead73ce19427eb1e364581b7f2e0
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#52000; Package guix-patches. (Sat, 15 Jan 2022 04:26:01 GMT) Full text and rfc822 format available.

Message #23 received at 52000 <at> debbugs.gnu.org (full text, mbox):

From: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
To: 52000 <at> debbugs.gnu.org
Subject: [PATCH v3 2/2] gnu: Add sqlitebrowser.
Date: Sat, 15 Jan 2022 04:24:59 +0000
* gnu/packages/databases.scm (sqlitebrowser): New variable.
---
Changes relative to PATCH v2:
* Replace old-style inputs with new-style inputs.
* Update copyright year.

 gnu/packages/databases.scm | 92 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 91 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 4d7b090d03..b089af5e8b 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -54,7 +54,7 @@
 ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo <at> member.fsf.org>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
-;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2021, 2022 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -131,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)
@@ -4156,6 +4157,95 @@ with no external dependencies.  The targets are small apps that would
 be blown away by a SQL-DB or an external database server.")
     (license license:expat)))
 
+(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"
+               (("json::parse\\(cellData, nullptr, false\\)")
+                "json::parse(cellData.toStdString(), nullptr, false)"))
+             (substitute* '("src/RemoteDock.cpp"
+                            "src/RemotePushDialog.cpp")
+               (("json::parse\\(reply, nullptr, false\\)")
+                "json::parse(reply.toStdString(), nullptr, false)"))
+             (substitute* "src/RemoteNetwork.cpp"
+               (("json::parse\\(reply->readAll\\(\\), nullptr, false\\)")
+                "json::parse((reply->readAll()).toStdString(), nullptr, false)")))))))
+    (inputs
+     (list json-modern-cxx
+           qcustomplot
+           qhexedit
+           qscintilla
+           qtbase-5
+           sqlite))
+    (native-inputs (list qttools))
+    (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





Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Mon, 21 Feb 2022 13:54:01 GMT) Full text and rfc822 format available.

Notification sent to Foo Chuan Wei <chuanwei.foo <at> hotmail.com>:
bug acknowledged by developer. (Mon, 21 Feb 2022 13:54:02 GMT) Full text and rfc822 format available.

Message #28 received at 52000-done <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
Cc: 52000-done <at> debbugs.gnu.org
Subject: Re: [bug#52000] [PATCH v3 1/2] gnu: Add qhexedit.
Date: Mon, 21 Feb 2022 13:51:05 +0000
[Message part 1 (text/plain, inline)]
Patch pushed as f2b841403921148eec4502ac23b55c1b75ab021e.
sqlitebrowser is already in Guix
(9183b8142b43082fee55a2730399243dea47ad0a).
Thanks.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Mar 2022 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.