gnu: Add qjson.

* gnu/packages/web.scm (qjson): New variable.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
This commit is contained in:
Pierre Langlois 2017-02-18 18:00:16 +00:00 committed by Ricardo Wurmus
parent 15b0844257
commit 412d00728e
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 42 additions and 0 deletions

View File

@ -21,6 +21,7 @@
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2017 Pierre Langlois <pierre.langlois@gmx.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -90,6 +91,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages xml)
#:use-module (gnu packages curl)
@ -510,6 +512,46 @@ easily construct JSON objects in C, output them as JSON formatted strings and
parse JSON formatted strings back into the C representation of JSON objects.")
(license l:x11)))
(define-public qjson
(package
(name "qjson")
(version "0.9.0")
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/flavio/qjson/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1m0h4rajj99hv9w4i381a8x81lxiv167lxk10ncvphpkfxs624p8"))))
(build-system cmake-build-system)
(arguments
;; The tests require a X server
`(#:configure-flags '("-DQJSON_BUILD_TESTS=ON"
"-DCMAKE_CXX_FLAGS=-std=gnu++11 -fPIC")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-broken-test
(lambda _
;; FIXME: One test fails. See
;; https://github.com/flavio/qjson/issues/105
(substitute* "tests/scanner/testscanner.cpp"
(("QTest::newRow\\(\"too large exponential\"\\)" line)
(string-append "//" line)))
#t))
(add-before 'check 'render-offscreen
(lambda _ (setenv "QT_QPA_PLATFORM" "offscreen") #t)))))
(inputs
`(("qtbase" ,qtbase)))
(home-page "http://qjson.sourceforge.net")
(synopsis "Library that maps JSON data to QVariant objects")
(description "QJson is a Qt-based library that maps JSON data to
@code{QVariant} objects. JSON arrays will be mapped to @code{QVariantList}
instances, while JSON's objects will be mapped to @code{QVariantMap}.")
;; Only version 2.1 of the license
(license l:lgpl2.1)))
(define-public krona-tools
(package
(name "krona-tools")