[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/07: gnu: nlohmann-json: Improve package style.
From: |
guix-commits |
Subject: |
03/07: gnu: nlohmann-json: Improve package style. |
Date: |
Sun, 14 May 2023 06:23:47 -0400 (EDT) |
lilyp pushed a commit to branch master
in repository guix.
commit f8d06e2c32abc86832925929794448690784348c
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Fri Apr 28 21:55:13 2023 +0200
gnu: nlohmann-json: Improve package style.
* gnu/package/cpp.scm (nlohmann-json)[source]<snippet>: Fit to 80 chars
width.
Use G-Expressions.
[arguments]: Use G-Expressions.
---
gnu/packages/cpp.scm | 70 +++++++++++++++++++++++++++-------------------------
1 file changed, 37 insertions(+), 33 deletions(-)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 886199af5e..27fa9048ab 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -611,41 +611,45 @@ data transfer object.")
(file-name (git-file-name name version))
(modules '((guix build utils)))
(snippet
- '(begin
- ;; Delete bundled software. Preserve doctest_compatibility.h, which
- ;; is a wrapper library added by this package.
- (install-file "./tests/thirdparty/doctest/doctest_compatibility.h"
"/tmp")
- (delete-file-recursively "./tests/thirdparty")
- (install-file "/tmp/doctest_compatibility.h"
"./tests/thirdparty/doctest")
-
- ;; Adjust for the unbundled fifo_map and doctest.
- (substitute* (find-files "./tests/" "\\.h(pp)?")
- (("#include \"doctest\\.h\"") "#include <doctest/doctest.h>")
- (("#include <doctest\\.h>") "#include <doctest/doctest.h>"))
- (with-directory-excursion "tests/src"
- (let ((files (find-files "." "\\.cpp$")))
- (substitute* files
- (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
- (string-append
- "#include <fifo_map/" fifo-map-hpp ">")))))))))
+ #~(begin
+ ;; Delete bundled software. Preserve doctest_compatibility.h,
which
+ ;; is a wrapper library added by this package.
+ (install-file "./tests/thirdparty/doctest/doctest_compatibility.h"
+ "/tmp")
+ (delete-file-recursively "./tests/thirdparty")
+ (install-file "/tmp/doctest_compatibility.h"
+ "./tests/thirdparty/doctest")
+
+ ;; Adjust for the unbundled fifo_map and doctest.
+ (substitute* (find-files "./tests/" "\\.h(pp)?")
+ (("#include \"doctest\\.h\"") "#include <doctest/doctest.h>")
+ (("#include <doctest\\.h>") "#include <doctest/doctest.h>"))
+ (with-directory-excursion "tests/src"
+ (let ((files (find-files "." "\\.cpp$")))
+ (substitute* files
+ (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
+ (string-append
+ "#include <fifo_map/" fifo-map-hpp ">")))))))))
(build-system cmake-build-system)
(arguments
- '(#:configure-flags
- (list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp.
- (string-append "-DJSON_TestDataDirectory="
- (dirname
- (search-input-directory %build-inputs
- "json_nlohmann_tests"))))
- #:phases (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
- (if tests?
- ;; Some tests need git and a full checkout, skip
those.
- (invoke "ctest" "-LE" "git_required"
- "-j" (if parallel-tests?
- (number->string
(parallel-job-count))
- "1"))
- (format #t "test suite not run~%")))))))
+ (list
+ #:configure-flags
+ #~(list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp.
+ (string-append "-DJSON_TestDataDirectory="
+ (dirname
+ (search-input-directory %build-inputs
+ "json_nlohmann_tests"))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
+ (if tests?
+ ;; Some tests need git and a full checkout, skip those.
+ (invoke "ctest" "-LE" "git_required"
+ "-j" (if parallel-tests?
+ (number->string (parallel-job-count))
+ "1"))
+ (format #t "test suite not run~%")))))))
(native-inputs
(list amalgamate
(let ((version "3.1.0"))
- branch master updated (3c8d0f9e71 -> 006bf1ba97), guix-commits, 2023/05/14
- 04/07: gnu: Add c-rrb., guix-commits, 2023/05/14
- 05/07: gnu: Add immer., guix-commits, 2023/05/14
- 01/07: gnu: Rename json-modern-cxx to nlohmann-json., guix-commits, 2023/05/14
- 03/07: gnu: nlohmann-json: Improve package style.,
guix-commits <=
- 02/07: gnu: nlohmann-json: Update to 3.11.2., guix-commits, 2023/05/14
- 06/07: gnu: Add zug., guix-commits, 2023/05/14
- 07/07: gnu: Add lager., guix-commits, 2023/05/14