me
/
guix
Archived
1
0
Fork 0

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.
master
Liliana Marie Prikler 2023-04-28 21:55:13 +02:00
parent 4a3f946408
commit f8d06e2c32
No known key found for this signature in database
GPG Key ID: 442A84B8C70E2F87
1 changed files with 36 additions and 32 deletions

View File

@ -611,12 +611,14 @@ data transfer object.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin #~(begin
;; Delete bundled software. Preserve doctest_compatibility.h, which ;; Delete bundled software. Preserve doctest_compatibility.h, which
;; is a wrapper library added by this package. ;; is a wrapper library added by this package.
(install-file "./tests/thirdparty/doctest/doctest_compatibility.h" "/tmp") (install-file "./tests/thirdparty/doctest/doctest_compatibility.h"
"/tmp")
(delete-file-recursively "./tests/thirdparty") (delete-file-recursively "./tests/thirdparty")
(install-file "/tmp/doctest_compatibility.h" "./tests/thirdparty/doctest") (install-file "/tmp/doctest_compatibility.h"
"./tests/thirdparty/doctest")
;; Adjust for the unbundled fifo_map and doctest. ;; Adjust for the unbundled fifo_map and doctest.
(substitute* (find-files "./tests/" "\\.h(pp)?") (substitute* (find-files "./tests/" "\\.h(pp)?")
@ -630,13 +632,15 @@ data transfer object.")
"#include <fifo_map/" fifo-map-hpp ">"))))))))) "#include <fifo_map/" fifo-map-hpp ">")))))))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
'(#:configure-flags (list
(list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp. #:configure-flags
#~(list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp.
(string-append "-DJSON_TestDataDirectory=" (string-append "-DJSON_TestDataDirectory="
(dirname (dirname
(search-input-directory %build-inputs (search-input-directory %build-inputs
"json_nlohmann_tests")))) "json_nlohmann_tests"))))
#:phases (modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(replace 'check (replace 'check
(lambda* (#:key tests? parallel-tests? #:allow-other-keys) (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
(if tests? (if tests?