gnu: nlohmann-json: Update to 3.11.2.

* gnu/packages/cpp.scm (nlohmann-json): Update to 3.11.2.
[source]<snippet>: Adjust accordingly.
[native-inputs]<json_test_data>: Update to 3.1.0.
This commit is contained in:
Liliana Marie Prikler 2023-04-28 21:50:32 +02:00
parent 58e84ec9af
commit 4a3f946408
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -599,7 +599,7 @@ (define-public json-dto
(define-public nlohmann-json (define-public nlohmann-json
(package (package
(name "nlohmann-json") (name "nlohmann-json")
(version "3.10.5") (version "3.11.2")
(home-page "https://github.com/nlohmann/json") (home-page "https://github.com/nlohmann/json")
(source (source
(origin (origin
@ -607,23 +607,22 @@ (define-public nlohmann-json
(uri (git-reference (url home-page) (uri (git-reference (url home-page)
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(sha256 (sha256
(base32 "1f9mi45ilwjc2w92grjc53sw038840bjpn8yjf6wc6bxs2nijfqd")) (base32 "0g6rfsbkvrxmacchz4kbr741yybj7mls3r4hgyfdd3pdbqhn2is9"))
(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 "./test/thirdparty/doctest/doctest_compatibility.h" "/tmp") (install-file "./tests/thirdparty/doctest/doctest_compatibility.h" "/tmp")
(for-each delete-file-recursively (delete-file-recursively "./tests/thirdparty")
'("./third_party" "./test/thirdparty")) (install-file "/tmp/doctest_compatibility.h" "./tests/thirdparty/doctest")
(install-file "/tmp/doctest_compatibility.h" "./test/thirdparty/doctest")
;; Adjust for the unbundled fifo_map and doctest. ;; Adjust for the unbundled fifo_map and doctest.
(substitute* "./test/thirdparty/doctest/doctest_compatibility.h" (substitute* (find-files "./tests/" "\\.h(pp)?")
(("#include \"doctest\\.h\"") (("#include \"doctest\\.h\"") "#include <doctest/doctest.h>")
"#include <doctest/doctest.h>")) (("#include <doctest\\.h>") "#include <doctest/doctest.h>"))
(with-directory-excursion "test/src" (with-directory-excursion "tests/src"
(let ((files (find-files "." "\\.cpp$"))) (let ((files (find-files "." "\\.cpp$")))
(substitute* files (substitute* files
(("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp) (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
@ -649,7 +648,7 @@ (define-public nlohmann-json
(format #t "test suite not run~%"))))))) (format #t "test suite not run~%")))))))
(native-inputs (native-inputs
(list amalgamate (list amalgamate
(let ((version "3.0.0")) (let ((version "3.1.0"))
(origin (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -658,7 +657,7 @@ (define-public nlohmann-json
(file-name (git-file-name "json_test_data" version)) (file-name (git-file-name "json_test_data" version))
(sha256 (sha256
(base32 (base32
"0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv")))))) "0nbirc428qx0lpi940p7y24fzdjbwl6xig3h5rdbihyymmdzhvbc"))))))
(inputs (inputs
(list doctest fifo-map)) (list doctest fifo-map))
(synopsis "JSON parser and printer library for C++") (synopsis "JSON parser and printer library for C++")