gnu: Add qtwebview.

* gnu/packages/qt.scm (qtwebview): New variable.

Change-Id: I2fbde95cb305433bdeb81b68c1fd68aac199583b
Signed-off-by: Zheng Junjie <z572@z572.online>
This commit is contained in:
Sughosha 2025-07-22 10:41:28 +05:30 committed by Zheng Junjie
parent e7d9e1bb20
commit 03ef1b50a8
No known key found for this signature in database
GPG key ID: 3B5AA993E1A2DFF0

View file

@ -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 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"))) 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 (define-public qtwebview-5
(package (package
(inherit qtsvg-5) (inherit qtsvg-5)