all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: 61724@debbugs.gnu.org
Cc: jgart <jgart@dismail.de>
Subject: [bug#61724] [PATCH v3 3/3] gnu: nlohmann-json: Improve package style.
Date: Fri, 28 Apr 2023 21:55:13 +0200	[thread overview]
Message-ID: <89cb6548f34a6a4b3e83441d5dfdeacd12b44a17.camel@gmail.com> (raw)
In-Reply-To: <e2966b2334223744777f0fd2636442ec@dismail.de>

* gnu/package/cpp.scm (nlohmann-json)[source]<snippet>: 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 <doctest/doctest.h>"))
-           (with-directory-excursion "test/src"
-             (let ((files (find-files "." "\\.cpp$")))
-               (substitute* files
-                 (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
-                  (string-append
-                   "#include <fifo_map/" fifo-map-hpp ">")))))))))
+        #~(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 <doctest/doctest.h>"))
+            (with-directory-excursion "test/src"
+              (let ((files (find-files "." "\\.cpp$")))
+                (substitute* files
+                  (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
+                   (string-append
+                    "#include <fifo_map/" fifo-map-hpp ">")))))))))
     (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"))
-- 
2.39.2





      parent reply	other threads:[~2023-04-28 21:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  5:06 [bug#61724] [PATCH 1/3] gnu: Add nlohmann-json jgart via Guix-patches via
2023-02-23  5:11 ` jgart via Guix-patches via
2023-02-23  5:12   ` [bug#61724] [PATCH 2/3] gnu: json-modern-cxx: Remove deprecated package jgart via Guix-patches via
2023-02-23  5:12   ` [bug#61724] [PATCH 3/3] gnu: Refactor packages to use new nlohmann-json variable jgart via Guix-patches via
2023-02-23 17:57   ` [bug#61724] [PATCH 1/3] gnu: Add nlohmann-json Liliana Marie Prikler
2023-02-23 20:17 ` [bug#61724] [PATCH v2 1/2] " jgart via Guix-patches via
2023-02-23 20:17   ` [bug#61724] [PATCH v2 2/2] gnu: Refactor packages to use new nlohmann-json variable jgart via Guix-patches via
2023-02-23 20:59   ` [bug#61724] [PATCH v2 1/2] gnu: Add nlohmann-json Liliana Marie Prikler
2023-03-10  1:58   ` jgart via Guix-patches via
2023-03-10  5:18     ` Liliana Marie Prikler
2023-04-27 18:57 ` [bug#61724] [PATCH v3 1/3] gnu: Rename json-modern-cxx to nlohmann-json Liliana Marie Prikler
2023-04-27 18:57 ` [bug#61724] [PATCH v4 1/7] " Liliana Marie Prikler
2023-04-28 19:50   ` [bug#61724] [PATCH v4 2/7] gnu: nlohmann-json: Update to 3.11.2 Liliana Marie Prikler
2023-04-28 19:55   ` [bug#61724] [PATCH v4 3/7] gnu: nlohmann-json: Improve package style Liliana Marie Prikler
2023-05-07 16:50     ` [bug#61724] [PATCH v4 3/3] gnu: nlohmann-json: Improve package style. (was [PATCH v4 3/7] gnu: nlohmann-json: Improve package style.) Liliana Marie Prikler
2023-05-11 12:53   ` [bug#61724] [PATCH v4 1/7] gnu: Rename json-modern-cxx to nlohmann-json Simon Tournier
2023-05-11 18:48     ` Liliana Marie Prikler
2023-05-14 10:24       ` bug#61724: " Liliana Marie Prikler
2023-04-28 19:50 ` [bug#61724] [PATCH v3 2/3] gnu: nlohmann-json: Update to 3.11.2 Liliana Marie Prikler
2023-04-29  0:15   ` jgart via Guix-patches via
2023-04-28 19:55 ` Liliana Marie Prikler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89cb6548f34a6a4b3e83441d5dfdeacd12b44a17.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=61724@debbugs.gnu.org \
    --cc=jgart@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.