From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wO3QAxUCsmHM4gAAgWs5BA (envelope-from ) for ; Thu, 09 Dec 2021 14:18:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sE0mOxQCsmHxSQAAbx9fmQ (envelope-from ) for ; Thu, 09 Dec 2021 13:18:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DACA5368A1 for ; Thu, 9 Dec 2021 14:18:12 +0100 (CET) Received: from localhost ([::1]:58126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvJJL-0003pr-SO for larch@yhetil.org; Thu, 09 Dec 2021 08:18:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvJJD-0003oQ-6T for guix-patches@gnu.org; Thu, 09 Dec 2021 08:18:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvJJC-0003cg-6Z for guix-patches@gnu.org; Thu, 09 Dec 2021 08:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mvJJC-0002Yf-2p for guix-patches@gnu.org; Thu, 09 Dec 2021 08:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51885] [PATCH v3 2/3] gnu: Add json. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Dec 2021 13:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51885 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 51885@debbugs.gnu.org Cc: Raghav Gururajan , jgart , anothersms@gmail.com Received: via spool by 51885-submit@debbugs.gnu.org id=B51885.16390558399774 (code B ref 51885); Thu, 09 Dec 2021 13:18:02 +0000 Received: (at 51885) by debbugs.gnu.org; 9 Dec 2021 13:17:19 +0000 Received: from localhost ([127.0.0.1]:42835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvJIV-0002Xa-Ic for submit@debbugs.gnu.org; Thu, 09 Dec 2021 08:17:19 -0500 Received: from out2.migadu.com ([188.165.223.204]:22059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvJIU-0002XT-6E for 51885@debbugs.gnu.org; Thu, 09 Dec 2021 08:17:18 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1639055836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Eo3zucDy3gItdkR+CzevKVar5EkBkIb7pPTnurC9Aqs=; b=XHX0gHlTwVsNA12GNrpjIXXF7hnYyW00sD9GJ2EoUEaPnkweJsd7gN/Dj60SVfx+/Yzgr0 uQ7McF9ARKjT97P+dGOVPlGrCRHjWJYy+OAzrF56UqAICR2ObV/8j5mtDuDqpy9dC5SBQA V2LJ2dkMCuMJcE+5jCkICMu6+AaNu/ey0kvKM7XXRVMW7KRVAat7BXrD9SZJXCnj71wv6O +AyCektdxfgsbLV2OsEEW2qrUJ64JOeEmZ7q+5Le7UdEfSIAzx9gfo08j1QnPHGEX3uFt8 2q2ZpBwiwFxlGiULrJRiinTzlPYTPkH5Ji9JS+a8KZSrnxbhrvvg9QOCjkwPUA== Date: Thu, 9 Dec 2021 08:16:47 -0500 Message-Id: <20211209131648.1752-2-rg@raghavgururajan.name> In-Reply-To: <20211209131648.1752-1-rg@raghavgururajan.name> References: <20211209131648.1752-1-rg@raghavgururajan.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches From: Raghav Gururajan via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: DACA5368A1 X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: Dr9YdHko4UXE * gnu/packages/cpp.scm (json): New variable. Co-authored-by: jgart --- gnu/packages/cpp.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 0ce2b681c8..d09de04f99 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -77,6 +77,69 @@ (define-module (gnu packages cpp) #:use-module (gnu packages web) #:use-module (gnu packages xml)) +(define-public json + (package + (name "json") + (version "3.10.4") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/nlohmann/json") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "17kxwxl6515s8nb5x7zy69c8qy4gswac66fp15261x1g6sa2jnkx")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-1))) + (snippet + `(begin + (delete-file-recursively "third_party") + (let ((keep + ;; Custom forks which are incompatible with the ones in Guix. + '("doctest" "fifo_map"))) + (with-directory-excursion "test/thirdparty" + (for-each delete-file-recursively + (lset-difference string=? + (scandir ".") + (cons* "." ".." keep))))) + #t)))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list + (string-append "-DJSON_TestDataDirectory=" + (assoc-ref %build-inputs "json_test_data"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda _ + (substitute* "test/CMakeLists.txt" + ;; Requires network connection. + (("add_subdirectory\\(cmake_fetch_content\\)") ""))))))) + (native-inputs + `(("json_test_data" + ,(origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/nlohmann/json_test_data") + (commit "v3.0.0"))) + (file-name + (git-file-name "json_test_data" "3.0.0")) + (sha256 + (base32 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv")))) + ("python" ,python-wrapper))) + (home-page "https://json.nlohmann.me/") + (synopsis "JSON for C++") + (description "@code{json} is a C++ json library for converting to and from +C++ data structures. It's design goals emphasize intuitive syntax, trivial +integration via a single header file, and serious test coverage involving all of +the codebase.") + (license license:expat))) + (define-public argagg (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748") (revision "0")) -- 2.34.0