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"))