diff mbox series

[bug#52000,1/2] gnu: Add qhexedit.

Message ID PU1PR01MB2155AA252ED1AC903AAD39D48D9D9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com
State Accepted
Headers show
Series gnu: Add sqlitebrowser. | expand

Checks

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

Commit Message

Foo Chuan Wei Nov. 20, 2021, 3:40 p.m. UTC
* gnu/packages/qt.scm (qhexedit): New variable.
---
 gnu/packages/qt.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
diff mbox series

Patch

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@brendan.scot>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
+;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@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")