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: 49855 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 173F327BBE2; Sun, 7 May 2023 17:07:33 +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 1D72827BBE9 for ; Sun, 7 May 2023 17:07:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvguh-000329-Tn; Sun, 07 May 2023 12:07:07 -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 1pvgug-00031j-Rv for guix-patches@gnu.org; Sun, 07 May 2023 12:07:06 -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 1pvgud-0006GE-04 for guix-patches@gnu.org; Sun, 07 May 2023 12:07:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvguc-0004BJ-I2 for guix-patches@gnu.org; Sun, 07 May 2023 12:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#61724] [PATCH v4 3/7] gnu: nlohmann-json: Improve package style. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 May 2023 16:07:02 +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 Received: via spool by 61724-submit@debbugs.gnu.org id=B61724.168347561016038 (code B ref 61724); Sun, 07 May 2023 16:07:02 +0000 Received: (at 61724) by debbugs.gnu.org; 7 May 2023 16:06:50 +0000 Received: from localhost ([127.0.0.1]:38260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvguQ-0004AZ-C9 for submit@debbugs.gnu.org; Sun, 07 May 2023 12:06:50 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:54430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvguN-0004A5-9Y for 61724@debbugs.gnu.org; Sun, 07 May 2023 12:06:47 -0400 Received: by mail-ed1-f65.google.com with SMTP id 4fb4d7f45d1cf-50bcae898b2so6670710a12.0 for <61724@debbugs.gnu.org>; Sun, 07 May 2023 09:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683475601; x=1686067601; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :from:to:cc:subject:date:message-id:reply-to; bh=9CIlwiRGxdWexmVZfBZBcOFjyE9tfBgU+SAPIaAsbB8=; b=cdK+9GUDLRl/gPNgQvbknghGqJ6FuMc2aC4Eg2/xlrHkLexcCnSte4v1XF9DMdWlaU PXEHy0MblHjTKHgNQ15E0bbrPzc1vqt3f2UHiUpaKeBzOwxUUNIF7GtTifUQ0kZEvyNb g/Hz2i+Q1EnhOD382tDy1NJO6APGL2mfo/dRCmCwuKKK0l9yA7cSK+VGRaRoq3VmT92R 9fk/fF7WHaa8AndED4yEpcm60l/N5QDuZbG4i/81nmx8OcFDYeH3VE23r1IF8Lai/BN7 bLAvvOiLhbAlgNIWgx3u8nvXJyXrkLdJ3kSR7/PCt3i78wCUuHE+io+3t/35TVtg8sx+ YwNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683475601; x=1686067601; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9CIlwiRGxdWexmVZfBZBcOFjyE9tfBgU+SAPIaAsbB8=; b=I5DPu7Et5kdexkF6p5u+UWO3fKLnhR0ScHhmxfodCI7LE2M6wzLEpr+N/dhEukcadq M4eL7wsOyzJ3fo1jYMaLpmh2Hn6jjd/9NzHe6xO80HyQTnDnDplw6rdbcb+O9tH0rUAj 5sFg0dleqY2kPTPnzH9Ti6XSt87T92Jt3uaqbNWF5GPuJlaCf2IpVhHtqiCxoEhK+OMw T/BcjGr/5f96nyhXOMhYOEmiJRYCXXbxK7uQzQ2SsZ5Wez8XQsfme69yt7VoSL5VSu59 4svAn7mAvsVPIK1y5eI4BEeQFBPeIMJzsFLdnM52bst1P7ytpQ9nKM7/+uumqSUA6hVp AEMg== X-Gm-Message-State: AC+VfDzriisVMqVmkexLBrTRKPGDg/Y7tmbKQRhR7FjM7m3q8F+Gln+F kgH05SY2OWIHU7V92o9umGvHvr1XWCxQjw== X-Google-Smtp-Source: ACHHUZ6b9nXlOA4e3Gv58c+mzSH2r7pu3Wgmv+ZQ8mXZO2BquMLGLjRZ/1lmZ7CdbhRNsdiqRlppZw== X-Received: by 2002:a17:907:9686:b0:966:65ee:beb7 with SMTP id hd6-20020a170907968600b0096665eebeb7mr675451ejc.71.1683475601477; Sun, 07 May 2023 09:06:41 -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 hy27-20020a1709068a7b00b0094f3d700868sm3766618ejc.80.2023.05.07.09.06.41 for <61724@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 09:06:41 -0700 (PDT) Message-Id: <911d4ae047d69888fe33fde18c832fc536837677.1683475550.git.liliana.prikler@gmail.com> In-Reply-To: <7429efc0ff6e48ddd1169a5353abbe6226edaaeb.1683475550.git.liliana.prikler@gmail.com> References: <7429efc0ff6e48ddd1169a5353abbe6226edaaeb.1683475550.git.liliana.prikler@gmail.com> From: Liliana Marie Prikler Date: Fri, 28 Apr 2023 21:55:13 +0200 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 | 70 +++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 5c2e6d2425..e797020124 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -610,41 +610,45 @@ (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 "./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 ") - (("#include ") "#include ")) - (with-directory-excursion "tests/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 "./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 ") + (("#include ") "#include ")) + (with-directory-excursion "tests/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.1.0"))