[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: gnu: Add qjson.
From: |
Ricardo Wurmus |
Subject: |
01/04: gnu: Add qjson. |
Date: |
Wed, 25 Oct 2017 10:05:58 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 412d00728e4d924a21737c189b38d67b53c1bca9
Author: Pierre Langlois <address@hidden>
Date: Sat Feb 18 18:00:16 2017 +0000
gnu: Add qjson.
* gnu/packages/web.scm (qjson): New variable.
Co-authored-by: Ricardo Wurmus <address@hidden>
---
gnu/packages/web.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 9fc4796..04886e0 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -21,6 +21,7 @@
;;; Copyright © 2017 Marius Bakke <address@hidden>
;;; Copyright © 2017 Kei Kebreau <address@hidden>
;;; Copyright © 2017 Petter <address@hidden>
+;;; Copyright © 2017 Pierre Langlois <address@hidden>
;;;
;;; 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
address@hidden 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")