~ruther/guix-local

03ef1b50a8b1efdd2b9c08bedf1f18e9490b091f — Sughosha 1 year, 3 months ago e7d9e1b
gnu: Add qtwebview.

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

Change-Id: I2fbde95cb305433bdeb81b68c1fd68aac199583b
Signed-off-by: Zheng Junjie <z572@z572.online>
1 files changed, 30 insertions(+), 0 deletions(-)

M gnu/packages/qt.scm
M gnu/packages/qt.scm => gnu/packages/qt.scm +30 -0
@@ 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)