From: jgart via Guix-patches via <guix-patches@gnu.org>
To: 61672@debbugs.gnu.org
Cc: jgart <jgart@dismail.de>
Subject: [bug#61672] [PATCH] gnu: Add nlohmann-json.
Date: Tue, 21 Feb 2023 07:40:23 +0100 [thread overview]
Message-ID: <20230221064023.11660-1-jgart@dismail.de> (raw)
* gnu/packages/web.scm (nlohmann-json): New variable.
---
gnu/packages/web.scm | 48 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 98db004482..e2f9dddf06 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -58,7 +58,7 @@
;;; Copyright © 2022 cage <cage-dev@twistfold.it>
;;; Copyright © 2022 Pradana Aumars <paumars@courrier.dev>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
-;;; Copyright © 2022 jgart <jgart@dismail.de>
+;;; Copyright © 2022, 2023 jgart <jgart@dismail.de>
;;; Copyright © 2023 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2022 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 David Thompson <dthompson2@worcester.edu>
@@ -1109,6 +1109,52 @@ (define-public jansson
data.")
(license license:expat)))
+(define-public nlohmann-json
+ (package
+ (name "nlohmann-json")
+ (version "3.11.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nlohmann/json")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0g6rfsbkvrxmacchz4kbr741yybj7mls3r4hgyfdd3pdbqhn2is9"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:out-of-source? #t
+ #:configure-flags
+ #~(list "-DJSON_FastTests=ON"
+ "-DJSON_MultipleHeaders=ON"
+ "-DJSON_BuildTests=ON"
+ (string-append "-DJSON_TestDataDirectory="
+ #$(this-package-native-input "json-test-data")))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ ;; Skip tests that require git or modify “installed files”.
+ (when tests?
+ (invoke "make" "ARGS=-LE 'not_reproducible|git_required' --verbose")))))))
+ (native-inputs
+ `(("json-test-data"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nlohmann/json_test_data")
+ (commit "v3.1.0")))
+ (sha256
+ (base32 "0nbirc428qx0lpi940p7y24fzdjbwl6xig3h5rdbihyymmdzhvbc"))
+ (file-name (git-file-name "vis-test" version))))))
+ (home-page "https://json.nlohmann.me/")
+ (synopsis "JSON for Modern C++")
+ (description "This package provides a JSON implementation with an
+intuitive syntax for C++, a single include header file, and with a
+codebase that has 100% code coverage.")
+ (license license:expat)))
+
(define-public json-c
(package
(name "json-c")
--
2.39.1
next reply other threads:[~2023-02-21 6:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 6:40 jgart via Guix-patches via [this message]
2023-02-21 6:43 ` [bug#61672] [PATCH v2] gnu: Add nlohmann-json jgart via Guix-patches via
2023-02-21 8:49 ` Liliana Marie Prikler
2023-02-21 13:37 ` jgart via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230221064023.11660-1-jgart@dismail.de \
--to=guix-patches@gnu.org \
--cc=61672@debbugs.gnu.org \
--cc=jgart@dismail.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).