From patchwork Thu Feb 23 20:17:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: jgart X-Patchwork-Id: 47243 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9008F16BD5; Thu, 23 Feb 2023 20:45:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 776E91684B for ; Thu, 23 Feb 2023 20:45:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVIRh-0002sa-2B; Thu, 23 Feb 2023 15:44:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVIRe-0002pq-D8 for guix-patches@gnu.org; Thu, 23 Feb 2023 15:44:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVIRe-0007Sr-4J for guix-patches@gnu.org; Thu, 23 Feb 2023 15:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVIRd-0002l7-KS for guix-patches@gnu.org; Thu, 23 Feb 2023 15:44:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61724] [PATCH v2 1/2] gnu: Add nlohmann-json. References: In-Reply-To: Resent-From: jgart Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Feb 2023 20:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61724 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61724@debbugs.gnu.org Cc: jgart , Liliana Marie Prikler Received: via spool by 61724-submit@debbugs.gnu.org id=B61724.167718498310521 (code B ref 61724); Thu, 23 Feb 2023 20:44:01 +0000 Received: (at 61724) by debbugs.gnu.org; 23 Feb 2023 20:43:03 +0000 Received: from localhost ([127.0.0.1]:35448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVIQg-0002jQ-2X for submit@debbugs.gnu.org; Thu, 23 Feb 2023 15:43:03 -0500 Received: from mx2.dismail.de ([159.69.191.136]:5411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVIQe-0002j5-37 for 61724@debbugs.gnu.org; Thu, 23 Feb 2023 15:43:01 -0500 Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id a059b362; Thu, 23 Feb 2023 21:42:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=20190914; bh=ucLEhKd1G1GWroF6N1AU6 KD3lQpgYvzg/XFKs9rRBMo=; b=FcC7urOurRTwcVvHsfAVMINqXELxpm7FqF+rL QZc43dorolv7epRxaHh4YQSqeD98ZB2p3eLAIbDHpxDwGPCs+IavmwB6jMgOJyYD 2GRLHhMbd9yMw9jT67LQTzR5zv7H6Cfyy/85ZJMTK1x5a/N2mW+untCt5Rg941sp USkBJaul+20vePMacsHqk1SE0NRUA4YcVm0p1svOMDfT4lqiTMFcXxEW7cxhuhR3 fPy1qj2AmBIw0fk/e/NGsznS0Gwmz6M7lcUTbxXFo3rCwdQon19dTCefNZvfX3W+ 8pv2Vu2PxB89gN8sp95/YtMfDG9t+riKt1C8V6MfMh5+6sZvA== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 3f68a59d; Thu, 23 Feb 2023 21:42:51 +0100 (CET) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 16419195; Thu, 23 Feb 2023 21:42:51 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 8c7814b1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 23 Feb 2023 21:42:45 +0100 (CET) Date: Thu, 23 Feb 2023 21:17:24 +0100 Message-Id: <20230223201724.28695-1-jgart@dismail.de> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: jgart X-ACL-Warn: , jgart via Guix-patches X-Patchwork-Original-From: jgart via Guix-patches via From: jgart Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/cpp.scm (nlohmann-json): New variable. --- hi lilyp, thanks for the review and tips! wdyt of v2 all best, jgart gnu/packages/cpp.scm | 98 +++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 61 deletions(-) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index ed6ae69198..7091459d97 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -22,7 +22,7 @@ ;;; Copyright © 2021 Nicolò Balzarotti ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Nikolay Korotkiy -;;; Copyright © 2021 jgart +;;; Copyright © 2021, 2023 jgart ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Disseminate Dissent ;;; Copyright © 2022 Efraim Flashner @@ -595,74 +595,50 @@ (define-public json-dto data transfer object.") (license license:bsd-3))) -(define-public json-modern-cxx +(define-public nlohmann-json (package - (name "json-modern-cxx") - (version "3.10.5") - (home-page "https://github.com/nlohmann/json") + (name "nlohmann-json") + (version "3.11.2") (source (origin (method git-fetch) - (uri (git-reference (url home-page) - (commit (string-append "v" version)))) - (sha256 - (base32 "1f9mi45ilwjc2w92grjc53sw038840bjpn8yjf6wc6bxs2nijfqd")) + (uri (git-reference + (url "https://github.com/nlohmann/json") + (commit (string-append "v" version)))) (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 "./test/thirdparty/doctest/doctest_compatibility.h" "/tmp") - (for-each delete-file-recursively - '("./third_party" "./test/thirdparty")) - (install-file "/tmp/doctest_compatibility.h" "./test/thirdparty/doctest") - - ;; Adjust for the unbundled fifo_map and doctest. - (substitute* "./test/thirdparty/doctest/doctest_compatibility.h" - (("#include \"doctest\\.h\"") - "#include ")) - (with-directory-excursion "test/src" - (let ((files (find-files "." "\\.cpp$"))) - (substitute* files - (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp) - (string-append - "#include "))))))))) + (sha256 + (base32 "0g6rfsbkvrxmacchz4kbr741yybj7mls3r4hgyfdd3pdbqhn2is9")))) (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 #:out-of-source? #t + #:configure-flags + #~(list "-DJSON_FastTests=ON" + "-DJSON_MultipleHeaders=ON" + "-DJSON_BuildTests=ON" + (string-append "-DJSON_TestDataDirectory=" + #$(this-package-native-input "json-test-data"))) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + ;; Skip tests that require git or modify “installed files”. + (when tests? + (invoke "make" "ARGS=-LE 'not_reproducible|git_required' --verbose"))))))) (native-inputs - (list amalgamate - (let ((version "3.0.0")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/nlohmann/json_test_data") - (commit (string-append "v" version)))) - (file-name (git-file-name "json_test_data" version)) - (sha256 - (base32 - "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv")))))) - (inputs - (list doctest fifo-map)) - (synopsis "JSON parser and printer library for C++") - (description "JSON for Modern C++ is a C++ JSON library that provides -intuitive syntax and trivial integration.") + `(("json-test-data" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nlohmann/json_test_data") + (commit "v3.1.0"))) + (sha256 + (base32 "0nbirc428qx0lpi940p7y24fzdjbwl6xig3h5rdbihyymmdzhvbc")) + (file-name (git-file-name "vis-test" version)))))) + (home-page "https://json.nlohmann.me/") + (synopsis "JSON for Modern C++") + (description "This package provides a JSON implementation with an +intuitive syntax for C++, a single include header file, and with a +codebase that has 100% code coverage.") (license license:expat))) (define-public xtl From patchwork Thu Feb 23 20:17:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jgart X-Patchwork-Id: 47245 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EB83116BC5; Thu, 23 Feb 2023 20:46:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4FA2C16BBC for ; Thu, 23 Feb 2023 20:46:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVIRg-0002rl-7o; Thu, 23 Feb 2023 15:44:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVIRe-0002pt-Eh for guix-patches@gnu.org; Thu, 23 Feb 2023 15:44:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVIRe-0007T5-66 for guix-patches@gnu.org; Thu, 23 Feb 2023 15:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVIRd-0002lE-W9 for guix-patches@gnu.org; Thu, 23 Feb 2023 15:44:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61724] [PATCH v2 2/2] gnu: Refactor packages to use new nlohmann-json variable. Resent-From: jgart Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Feb 2023 20:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61724 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61724@debbugs.gnu.org Cc: jgart Received: via spool by 61724-submit@debbugs.gnu.org id=B61724.167718498710537 (code B ref 61724); Thu, 23 Feb 2023 20:44:01 +0000 Received: (at 61724) by debbugs.gnu.org; 23 Feb 2023 20:43:07 +0000 Received: from localhost ([127.0.0.1]:35450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVIQl-0002js-3K for submit@debbugs.gnu.org; Thu, 23 Feb 2023 15:43:07 -0500 Received: from mx2.dismail.de ([159.69.191.136]:5411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVIQf-0002j5-HX for 61724@debbugs.gnu.org; Thu, 23 Feb 2023 15:43:03 -0500 Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id ef7c0c53 for <61724@debbugs.gnu.org>; Thu, 23 Feb 2023 21:42:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=20190914; bh=2vWTSmC04XroMk7zZCUuW yISxunMeh5FZcs+HR7C0aw=; b=GVqZCFL8Ua5EswaDyCwiniJvsokaI8jrVZ7ue jA4SnNtJZwao47kac9td3X8pUeuHzhjulSUIlJL4j7q2/wgzl+ubFcctEMYovxbw WEtqNwmAtVq9657/oi/Ob4EhYtHMc9wfzjzI5JPP+2IXStMYL0x2/Iy3tzWhgR4P VgptA1rgoGSq7+xaR9Lb6EByv8kF+85vJ8Q9/1P6fCzVkfJbex+JzbZXgBvRARj/ N5TRCyufk6SQKwGfcK285qSc+og0PszyypnFOS0MAWoj3gDmXsxLBXv9gswv4ZMb NAhMUJEkkKv/lK9YddXzejPOQm3b0FsVMMVZhkJizlQsHz4yQ== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 8e296ecf for <61724@debbugs.gnu.org>; Thu, 23 Feb 2023 21:42:53 +0100 (CET) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id fab0efd4 for <61724@debbugs.gnu.org>; Thu, 23 Feb 2023 21:42:52 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 30496258 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 23 Feb 2023 21:42:46 +0100 (CET) Date: Thu, 23 Feb 2023 21:17:25 +0100 Message-Id: <20230223201724.28695-2-jgart@dismail.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223201724.28695-1-jgart@dismail.de> References: <20230223201724.28695-1-jgart@dismail.de> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: jgart X-ACL-Warn: , jgart via Guix-patches X-Patchwork-Original-From: jgart via Guix-patches via From: jgart Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/cpp.scm (json-modern-cxx): Delete variable. * gnu/packages/cpp.scm (xtl): Use new variable. [inputs]: Use variable. * gnu/packages/cpp.scm (jsonnet): Use new variable. [inputs]: Use variable. * gnu/packages/cybersecurity.scm (blacksmith): Use new variable. [inputs]: Use variable. * gnu/packages/build-tools.scm (bear): Use new variable. [inputs]: Use variable. * gnu/packages/games.scm (openrct2): Use new variable. [inputs]: Use variable. * gnu/packages/graphics.scm (f3d): Use new variable. [native-inputs]: Use variable. * gnu/packages/hardware.scm (openrgb): Use new variable. [arguments]: Use variable. [inputs]: Use variable. * gnu/packages/irods.scm (irods): Use new variable. [inputs]: Use variable. * gnu/packages/jupyter.scm (xeus): Use new variable. [inputs]: Use variable. * gnu/packages/messaging.scm (mtxclient): Use new variable. [inputs]: Use variable. * gnu/packages/text-editors.scm (jucipp): Use new variable. [inputs]: Use variable. * gnu/packages/video.scm (mkvtoolnix): Use new variable. [inputs]: Use variable. * gnu/packages/xdisorg.scm (nwg-launchers): Use new variable. [native-inputs]: Use variable. --- gnu/packages/build-tools.scm | 2 +- gnu/packages/cpp.scm | 7 +++++-- gnu/packages/cybersecurity.scm | 2 +- gnu/packages/games.scm | 2 +- gnu/packages/graphics.scm | 2 +- gnu/packages/hardware.scm | 4 ++-- gnu/packages/irods.scm | 4 ++-- gnu/packages/jupyter.scm | 2 +- gnu/packages/messaging.scm | 4 ++-- gnu/packages/text-editors.scm | 2 +- gnu/packages/video.scm | 2 +- gnu/packages/xdisorg.scm | 2 +- 12 files changed, 19 insertions(+), 16 deletions(-) diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 3d03c37a2c..0e043b5cf6 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -147,7 +147,7 @@ (define-public bear `(("c-ares" ,c-ares) ("fmt" ,fmt-8) ("grpc" ,grpc) - ("json-modern-cxx" ,json-modern-cxx) + ("nlohmann-json" ,nlohmann-json) ("protobuf" ,protobuf) ("python" ,python-wrapper) ("re2" ,re2) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 7091459d97..d365c2ba74 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -595,6 +595,9 @@ (define-public json-dto data transfer object.") (license license:bsd-3))) +(define-public json-modern-cxx + (deprecated-package "json-modern-cxx" nlohmann-json)) + (define-public nlohmann-json (package (name "nlohmann-json") @@ -656,7 +659,7 @@ (define-public xtl "134pgvmf9cx5dxs0m0m3qhp3m3r1gl86ic3xax21zc4sdj8sdq46")) (file-name (git-file-name name version)))) (native-inputs - (list doctest googletest json-modern-cxx)) + (list doctest googletest nlohmann-json)) (arguments '(#:configure-flags '("-DBUILD_TESTS=ON") @@ -1805,7 +1808,7 @@ (define-public jsonnet (native-inputs (list googletest pkg-config)) (inputs - (list json-modern-cxx)) + (list nlohmann-json)) (home-page "https://jsonnet.org/") (synopsis "Data templating language") (description "Jsonnet is a templating language extending JSON diff --git a/gnu/packages/cybersecurity.scm b/gnu/packages/cybersecurity.scm index 7bca251d06..cb03cbd5aa 100644 --- a/gnu/packages/cybersecurity.scm +++ b/gnu/packages/cybersecurity.scm @@ -89,7 +89,7 @@ (define-public blacksmith (native-inputs (list pkg-config)) (inputs - (list argagg asmjit json-modern-cxx)) + (list argagg asmjit nlohmann-json)) (home-page "https://comsec.ethz.ch/research/dram/blacksmith") (synopsis "Rowhammer fuzzer with non-uniform and frequency-based patterns") (description diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index e1639a8c64..10a22fe031 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -4763,7 +4763,7 @@ (define-public openrct2 ("freetype" ,freetype) ("icu4c" ,icu4c) ("jansson" ,jansson) - ("json-modern-cxx" ,json-modern-cxx) + ("nlohmann-json" ,nlohmann-json) ("libpng" ,libpng) ("libzip" ,libzip) ("mesa" ,mesa) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 94b93970b1..cc3ae9909f 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -2556,7 +2556,7 @@ (define-public f3d (native-inputs (list cxxopts help2man - json-modern-cxx)) + nlohmann-json)) (inputs (list alembic assimp diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index c00a6e2d91..9fb896a36a 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -1070,7 +1070,7 @@ (define-public openrgb (string-append #$(this-package-input "hueplusplus") "/include/hueplusplus")) (("dependencies/json") - (string-append #$(this-package-input "json-modern-cxx") + (string-append #$(this-package-input "nlohmann-json") "/include/nlohmann"))))) ;; Call qmake instead of configure to create a Makefile. (replace 'configure @@ -1078,7 +1078,7 @@ (define-public openrgb (inputs (list hidapi hueplusplus - json-modern-cxx + nlohmann-json libusb mbedtls-apache qtbase-5)) diff --git a/gnu/packages/irods.scm b/gnu/packages/irods.scm index 5c9b66000c..a14ac87aa2 100644 --- a/gnu/packages/irods.scm +++ b/gnu/packages/irods.scm @@ -143,7 +143,7 @@ (define-public irods ("boost" ,boost-for-irods) ("cppzmq" ,cppzmq) ("fmt" ,fmt-6) - ("json" ,json-modern-cxx) + ("json" ,nlohmann-json) ("libarchive" ,libarchive) ("libcxxabi" ,libcxxabi-6) ; we need this for linking with -lc++abi ("linux-pam" ,linux-pam) @@ -247,7 +247,7 @@ (define-public irods-client-icommands ("cppzmq" ,cppzmq) ("fmt" ,fmt-6) ("irods" ,irods) - ("json" ,json-modern-cxx) + ("json" ,nlohmann-json) ("libarchive" ,libarchive) ("libcxxabi" ,libcxxabi-6) ; we need this for linking with -lc++abi ("mit-krb5" ,mit-krb5) diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm index 20c72a7437..cfc7ff0451 100644 --- a/gnu/packages/jupyter.scm +++ b/gnu/packages/jupyter.scm @@ -195,7 +195,7 @@ (define-public xeus python-jupyter-client)) (inputs (list xtl - json-modern-cxx + nlohmann-json cppzmq zeromq openssl diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index d540309a8f..f3456f7eaf 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -2331,7 +2331,7 @@ (define-public mtxclient (list boost coeurl curl - json-modern-cxx + nlohmann-json libevent libsodium olm @@ -2414,7 +2414,7 @@ (define-public nheko gst-plugins-base gst-plugins-bad ; sdp & webrtc for voip gst-plugins-good-qt ; rtpmanager for voip - json-modern-cxx + nlohmann-json libevent libnice ; for voip olm diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 16400481b0..56da6139f9 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -390,7 +390,7 @@ (define-public jucipp clang-11 ;XXX: must be the same version as Mesas LLVM gtkmm-3 gtksourceviewmm - json-modern-cxx + nlohmann-json libgit2 universal-ctags)) (synopsis "Lightweight C++ IDE") diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index fcbafdb846..7638412227 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1049,7 +1049,7 @@ (define-public mkvtoolnix ("gettext" ,gettext-minimal) ("googletest" ,googletest) ("libxslt" ,libxslt) - ("json-modern-cxx" ,json-modern-cxx) + ("nlohmann-json" ,nlohmann-json) ("perl" ,perl) ("pkg-config" ,pkg-config) ("po4a" ,po4a) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index ddb70bd817..574a28cdaa 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -3114,7 +3114,7 @@ (define-public nwg-launchers (base32 "0hq2qiqxvrw3g515ywcb676ljc8mdw3pyslgxr3vahizfljah1pv")))) (build-system meson-build-system) - (native-inputs (list json-modern-cxx pkg-config)) + (native-inputs (list nlohmann-json pkg-config)) (inputs (list gtk-layer-shell gtkmm-3 librsvg)) (home-page "https://github.com/nwg-piotr/nwg-launchers") (synopsis "Application launchers for wlroots") From patchwork Fri Apr 28 19:55:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 49664 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 31D5A27BBE2; Fri, 28 Apr 2023 22:27:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5103127BBE9 for ; Fri, 28 Apr 2023 22:27:08 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psVcO-0000u8-Ou; Fri, 28 Apr 2023 17:27:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psVcM-0000tR-3t for guix-patches@gnu.org; Fri, 28 Apr 2023 17:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1psVcL-0004by-Rk for guix-patches@gnu.org; Fri, 28 Apr 2023 17:27:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psVcL-0001ev-N9 for guix-patches@gnu.org; Fri, 28 Apr 2023 17:27:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#61724] [PATCH v3 3/3] gnu: nlohmann-json: Improve package style. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Apr 2023 21:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61724 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61724@debbugs.gnu.org Cc: jgart Received: via spool by 61724-submit@debbugs.gnu.org id=B61724.16827171876299 (code B ref 61724); Fri, 28 Apr 2023 21:27:01 +0000 Received: (at 61724) by debbugs.gnu.org; 28 Apr 2023 21:26:27 +0000 Received: from localhost ([127.0.0.1]:34655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psVbm-0001dS-L4 for submit@debbugs.gnu.org; Fri, 28 Apr 2023 17:26:27 -0400 Received: from mail-ej1-f66.google.com ([209.85.218.66]:54490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psVbk-0001d8-Hk for 61724@debbugs.gnu.org; Fri, 28 Apr 2023 17:26:25 -0400 Received: by mail-ej1-f66.google.com with SMTP id a640c23a62f3a-94f3cd32799so54879066b.0 for <61724@debbugs.gnu.org>; Fri, 28 Apr 2023 14:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682717178; x=1685309178; h=mime-version:message-id:cc:to:subject:date:from:from:to:cc:subject :date:message-id:reply-to; bh=q4B9nw0D/UBJGOoBfc5VGhyurIRSnogEp2eX+sIJgk0=; b=bOJlbnf6CUdB7rVzkv7imfxWf1+B+YMArFKJC+WWDDnD+/aI38isASOvkRDEvmLqKl GoIU451oBAspJLu1FtEJ4+TTcBlXLuc3DTprneCVaAsuJjJpJvwbOLEeS1qW4R9bC6y/ F824CVAU5XDwj99RBbc2CxlQOA6AlkPYaTCySlVOofqwMCDHG2Tbl9AhBADUDFkXx4zg Z8LFPIvkG1N79kqCBojukPD+BHH3F7NIv5g6rUbxpakhjcZ2x9IvX8zAiYhhJzAc9G0r yaBQfVB3W/wWEect5UpBgzqXAEEqGIMhNUnLQ7FL2e/1+gEXAudc7wiVytPguHttyFBP /dLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682717178; x=1685309178; h=mime-version:message-id:cc:to:subject:date:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=q4B9nw0D/UBJGOoBfc5VGhyurIRSnogEp2eX+sIJgk0=; b=gtUnbkKgNUXYZWMFg4b47xcfAOdkyRz8iSTyCnBJFMBSRF55k4nHWEZOaPijCk2rHu kS+HuIets96DDSY5F7bdtWDiHZA1Za0n6+PrZfkdGIBXbzQ4oPG6hCXR+5HymaWiL8Bp FD0GBIOTk+FBevzB8zlJl+k+54G3Y8hI7wQELOE2vFiGFqOVoHheeGS7rdLLDIwPZmrR xyfPf8bhHW4XuT4/RmQ5vp5EitDAG8dK0lj1rx5/n11OAeNgXvhBRh3CkMGdNQKGoCE7 Nrw+pDhynVR6M8RI50OTIKGJ/X2uv4/7vr7FJNHU2fPXGF3X6PA+3nUXUNM63AAZoFrm 665Q== X-Gm-Message-State: AC+VfDyUoz1O+8y7pgkjOP5b7oSHc8QnPENynYGukAwMNVXUss4q43Yp gVoThvRnqXcsPhE6RN2JkZwPNnU8JWHfFg== X-Google-Smtp-Source: ACHHUZ63NIDc0NYbP3geGBNRBhdFwyn3CT+HnD03h4D23xNiOYZH289WuTuYkHUaGEUQGR1ATdF1dQ== X-Received: by 2002:a17:907:3e1a:b0:94f:19b5:bafd with SMTP id hp26-20020a1709073e1a00b0094f19b5bafdmr7266162ejc.42.1682717178343; Fri, 28 Apr 2023 14:26:18 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id ku15-20020a170907788f00b009571293d6acsm10631004ejc.59.2023.04.28.14.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 14:26:18 -0700 (PDT) From: Liliana Marie Prikler Date: Fri, 28 Apr 2023 21:55:13 +0200 Message-ID: <89cb6548f34a6a4b3e83441d5dfdeacd12b44a17.camel@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/package/cpp.scm (nlohmann-json)[source]: Fit to 80 chars width. Use G-Expressions. [arguments]: Use G-Expressions. --- gnu/packages/cpp.scm | 72 +++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 05208422ec..3a8c9fe1bf 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -610,42 +610,46 @@ (define-public nlohmann-json (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 "./test/thirdparty/doctest/doctest_compatibility.h" "/tmp") - (for-each delete-file-recursively - '("./third_party" "./test/thirdparty")) - (install-file "/tmp/doctest_compatibility.h" "./test/thirdparty/doctest") - - ;; Adjust for the unbundled fifo_map and doctest. - (substitute* "./test/thirdparty/doctest/doctest_compatibility.h" - (("#include \"doctest\\.h\"") - "#include ")) - (with-directory-excursion "test/src" - (let ((files (find-files "." "\\.cpp$"))) - (substitute* files - (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp) - (string-append - "#include "))))))))) + #~(begin + ;; Delete bundled software. Preserve doctest_compatibility.h, which + ;; is a wrapper library added by this package. + (install-file "./test/thirdparty/doctest/doctest_compatibility.h" + "/tmp") + (for-each delete-file-recursively + '("./third_party" "./test/thirdparty")) + (install-file "/tmp/doctest_compatibility.h" + "./test/thirdparty/doctest") + + ;; Adjust for the unbundled fifo_map and doctest. + (substitute* "./test/thirdparty/doctest/doctest_compatibility.h" + (("#include \"doctest\\.h\"") + "#include ")) + (with-directory-excursion "test/src" + (let ((files (find-files "." "\\.cpp$"))) + (substitute* files + (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp) + (string-append + "#include "))))))))) (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.0.0"))