summaryrefslogtreecommitdiff
path: root/gnu/packages/qt.scm
diff options
context:
space:
mode:
authorSimon South <[email protected]>2023-01-27 15:34:27 -0500
committerDanny Milosavljevic <[email protected]>2024-12-22 12:47:59 +0100
commitd41b8a5b346df5f67434ac46025a2a12f3db23cc (patch)
tree80cc04607344f81412055194e08d51dceac32cb9 /gnu/packages/qt.scm
parent5c78da2834cc90fdecfc315d1e5a5a89165e7c01 (diff)
gnu: Add qtimgui.
* gnu/packages/qt.scm (qtimgui): New variable. Signed-off-by: Danny Milosavljevic <[email protected]>
Diffstat (limited to 'gnu/packages/qt.scm')
-rw-r--r--gnu/packages/qt.scm63
1 files changed, 63 insertions, 0 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 6d0d975db2..e51962e0a7 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -30,6 +30,7 @@
;;; Copyright © 2023 Sharlatan Hellseher <[email protected]>
;;; Copyright © 2022, 2024 Zheng Junjie <[email protected]>
;;; Copyright © 2023 Herman Rimm <[email protected]>
+;;; Copyright © 2023 Simon South <[email protected]>
;;; Copyright © 2024 Foundation Devices, Inc. <[email protected]>
;;; Copyright © 2024 Josep Bigorra <[email protected]>
;;;
@@ -128,6 +129,7 @@
#:use-module (gnu packages sqlite)
#:use-module (gnu packages telephony)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages toolkits)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
@@ -4514,6 +4516,67 @@ This package provides the Python bindings.")))
(description
"This package contains the union of PyQt and the Qscintilla extension.")))
+(define-public qtimgui
+ (let ((commit "48d64a715b75dee24e398f7e5b0942c2ca329334")
+ (revision "0"))
+ (package
+ (name "qtimgui")
+ (version (git-version "0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/seanchas116/qtimgui")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0x71j8m15w003ak0d7q346rlwyvklkda9l0dwbxfx6kny3gsl11k"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DQTIMGUI_BUILD_IMGUI=OFF"
+ "-DQTIMGUI_BUILD_IMPLOT=OFF")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "CMakeLists.txt"
+ ;; Disable building the examples.
+ (("^add_subdirectory\\(examples\\)") ""))
+ (substitute* "src/CMakeLists.txt"
+ ;; Build shared libraries, not static.
+ (("STATIC") "SHARED")
+ ;; Compile with the system imgui headers.
+ (("^(target_include_directories.*)\\)" _ prefix)
+ (string-append prefix
+ " "
+ (search-input-directory inputs
+ "include/imgui")
+ ")")))))
+ (replace 'install
+ ;; No install target provided; manually copy the header and
+ ;; library files to the output.
+ (lambda* (#:key source #:allow-other-keys)
+ (for-each
+ (lambda (file-name)
+ (install-file (string-append source "/src/" file-name)
+ (string-append #$output "/include/qtimgui")))
+ '("ImGuiRenderer.h" "QtImGui.h"))
+ (for-each
+ (lambda (file-name)
+ (install-file (string-append "src/" file-name)
+ (string-append #$output "/lib")))
+ '("libqt_imgui_quick.so" "libqt_imgui_widgets.so")))))
+ #:tests? #f)) ; no test suite
+ (inputs
+ (list imgui-1.86 implot qtbase-5 qtdeclarative-5))
+ (home-page "https://github.com/seanchas116/qtimgui")
+ (synopsis "Qt backend for the ImGui GUI library")
+ (description "QtImGui allows the ImGui C++ GUI library to be used by Qt
+applications within subclasses of @code{QOpenGLWidget} and
+@code{QOpenGLWindow}.")
+ (license license:expat))))
+
(define-public qtkeychain
(package
(name "qtkeychain")