Subject: Re: bug#25787: [PATCH 1/6] gnu: Add qjson.

From: Marius Bakke <[email-masked]>
Date: Wed, 22 Feb 2017 16:59:15 +0100

Pierre Langlois <[email-masked]> writes:

> * gnu/packages/qt.scm (qjson): New variable.
> ---
>  gnu/packages/qt.scm | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
> index 47a7caae4..0895e034c 100644
> --- a/gnu/packages/qt.scm
> +++ b/gnu/packages/qt.scm
> @@ -5,6 +5,7 @@
>  ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <[email-masked]>
>  ;;; Copyright © 2016, 2017 ng0 <[email-masked]>
>  ;;; Copyright © 2016 Thomas Danckaert <[email-masked]>
> +;;; Copyright © 2017 Pierre Langlois <[email-masked]>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1135,6 +1136,33 @@ developers using C++ or QML, a CSS & JavaScript like language.")
>       `(("qtbase" ,qtbase)
>         ("qtdeclarative" ,qtdeclarative)))))
>  
> +(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")

This line is not necessary.

> +      `(#:tests? #f))
> +    (inputs
> +      `(("qt" ,qt-4)))

Will this work with qt5 as well? If so, please build against "qtbase"
here. Then you can add a qt4 variant by adding something like this at
the end:

(define-public qjson-qt4
  (package (inherit qjson)
           (name "qjson-qt4")
           (inputs
            `(("qt" ,qt-4)))))

Otherwise LGTM!