[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/08: gnu: Add json-modern-cxx.
From: |
Ludovic Courtès |
Subject: |
06/08: gnu: Add json-modern-cxx. |
Date: |
Mon, 28 May 2018 08:52:41 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit e3c0676adfb954f58b9237629d82ad2030159f40
Author: Fis Trivial <address@hidden>
Date: Mon May 28 08:11:23 2018 +0000
gnu: Add json-modern-cxx.
* gnu/packages/cpp.scm (json-modern-cxx): New variable.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/packages/cpp.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 2caf6af..4831ab0 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))
@@ -195,3 +197,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)))
+ (inputs
+ `(("catch2" ,catch-framework2)
+ ("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)))
- branch master updated (25816c4 -> 70770b9), Ludovic Courtès, 2018/05/28
- 03/08: gnu: Add catch-framework2., Ludovic Courtès, 2018/05/28
- 07/08: gnu: Add xtl., Ludovic Courtès, 2018/05/28
- 04/08: gnu: Add amalgamate., Ludovic Courtès, 2018/05/28
- 06/08: gnu: Add json-modern-cxx.,
Ludovic Courtès <=
- 08/08: gnu: Add xtensor., Ludovic Courtès, 2018/05/28
- 02/08: system: Remove uses of the 'title' field of <file-system>., Ludovic Courtès, 2018/05/28
- 05/08: gnu: Add fifo-map., Ludovic Courtès, 2018/05/28
- 01/08: file-systems: Remove 'title' field and add <file-system-label>., Ludovic Courtès, 2018/05/28