diff options
author | Sughosha <sughosha@disroot.org> | 2025-07-22 10:41:28 +0530 |
---|---|---|
committer | Zheng Junjie <z572@z572.online> | 2025-07-28 11:54:36 +0800 |
commit | 03ef1b50a8b1efdd2b9c08bedf1f18e9490b091f (patch) | |
tree | 75d540bbe1f2f70fef6a433055801f47a5ddf485 | |
parent | e7d9e1bb204b391c261502ac5af8489d79ee9ece (diff) |
gnu: Add qtwebview.
* gnu/packages/qt.scm (qtwebview): New variable.
Change-Id: I2fbde95cb305433bdeb81b68c1fd68aac199583b
Signed-off-by: Zheng Junjie <z572@z572.online>
-rw-r--r-- | gnu/packages/qt.scm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 4e46a754fd..9489ceadd8 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -2406,6 +2406,36 @@ WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any compatible web browser without the use of plug-ins. The API is similar to OpenGL ES 2.0 and can be used in HTML5 canvas elements"))) +(define-public qtwebview + (package + (name "qtwebview") + (version "6.8.2") + (source (origin + (method url-fetch) + (uri (qt-url name version)) + (sha256 + (base32 + "0hyhpr3ai77pwdc69q73r1wkibdn2vn6v1pqkc8minck24kkdd46")))) + (build-system cmake-build-system) + (arguments + (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'set-display + (lambda _ + ;; Make Qt render "offscreen", required for tests. + (setenv "QT_QPA_PLATFORM" "offscreen") + ;; Set writable HOME for teststing cache directory. + (setenv "HOME" "/tmp")))))) + (native-inputs (list perl)) + (inputs (list qtbase qtdeclarative qtwebengine)) + (synopsis "Display web content in a QML application") + (description "Qt WebView provides a way to display web content in a QML +application without necessarily including a full web browser stack by using +native APIs where it makes sense.") + (home-page (package-home-page qtbase)) + (license (package-license qtbase)))) + (define-public qtwebview-5 (package (inherit qtsvg-5) |