[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx.
From: |
Fis Trivial |
Subject: |
[bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx. |
Date: |
Mon, 28 May 2018 08:11:23 +0000 |
* gnu/packages/cpp.scm (json-modern-cxx): New variable.
---
gnu/packages/cpp.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 5644311a1..17dab4c3b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -29,7 +29,9 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages check)
+ #:use-module (gnu packages code)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages llvm)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages tls))
@@ -196,3 +198,44 @@ batches.")
container which uses the order in which keys were inserted to the container
as ordering relation.")
(license license:expat))))
+
+(define-public json-modern-cxx
+ (package
+ (name "json-modern-cxx")
+ (version "3.1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/nlohmann/json/archive/v" version ".tar.gz"))
+ (sha256
+ (base32
+ "0m5fhdpx2qll933db2nsi30nns3cifavzvijzz6mxhdkpmngmzz8"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file-recursively "./third_party")
+ (delete-file-recursively "./test/thirdparty")
+ (delete-file-recursively "./benchmarks/thirdparty")
+ ;; Splits catch and fifo_map
+ (with-directory-excursion "test/src"
+ (let ((files (find-files "." ".*\\.cpp")))
+ (substitute* files
+ (("#include ?\"(catch.hpp)\"" all catch-hpp)
+ (string-append "#include <catch/" catch-hpp ">")))
+ (substitute* files
+ (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
+ (string-append
+ "#include <fifo_map/" fifo-map-hpp ">")))))))))
+ (native-inputs
+ `(("amalgamate" ,amalgamate)
+ ("catch2" ,catch-framework2)
+ ("clang-runtime" ,clang-runtime)
+ ("fifo-map" ,fifo-map)))
+ (home-page "https://github.com/nlohmann/json")
+ (build-system cmake-build-system)
+ (synopsis "JSON parser and printer library for C++")
+ (description "JSON for Modern C++ is a C++ json library that provides
+intutive syntax and trivial integration.")
+ (license license:expat)))
--
2.14.3
- [bug#31430] [PATCH 2/3] gnu: Add xtl., (continued)
- [bug#31430] [PATCH 3/3] gnu: Add xtensor., Fis Trivial, 2018/05/12
- [bug#31430] [PATCH 0/3] gnu: Add xtensor and its dependencies., Ludovic Courtès, 2018/05/23
- [bug#31430] [PATCH 0/6] Add xtensor and its dependencies (new patches)., Fis Trivial, 2018/05/28
- [bug#31430] [PATCH 1/6] gnu: Add catch-framework2., Fis Trivial, 2018/05/28
- [bug#31430] [PATCH 2/6] gnu: Add amalgamate., Fis Trivial, 2018/05/28
- [bug#31430] [PATCH 3/6] gnu: Add fifo-map., Fis Trivial, 2018/05/28
- [bug#31430] [PATCH 4/6] gnu: Add json-modern-cxx.,
Fis Trivial <=
- [bug#31430] [PATCH 6/6] gnu: Add xtensor., Fis Trivial, 2018/05/28
- [bug#31430] [PATCH 5/6] gnu: Add xtl., Fis Trivial, 2018/05/28