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 ePj7KVb6pmF1UgEAgWs5BA (envelope-from ) for ; Wed, 01 Dec 2021 05:30:14 +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 SrmIJVb6pmE0cwAAbx9fmQ (envelope-from ) for ; Wed, 01 Dec 2021 04:30:14 +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 8004B3762C for ; Wed, 1 Dec 2021 05:30:14 +0100 (CET) Received: from localhost ([::1]:52282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msHG1-0000Tt-IG for larch@yhetil.org; Tue, 30 Nov 2021 23:30:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msHFr-0000RW-EL for guix-patches@gnu.org; Tue, 30 Nov 2021 23:30:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msHFr-0005MC-74 for guix-patches@gnu.org; Tue, 30 Nov 2021 23:30:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1msHFr-0005wO-0a for guix-patches@gnu.org; Tue, 30 Nov 2021 23:30:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51885] [PATCH 3/4] gnu: Add json. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Dec 2021 04:30: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 Received: via spool by 51885-submit@debbugs.gnu.org id=B51885.163833300022807 (code B ref 51885); Wed, 01 Dec 2021 04:30:02 +0000 Received: (at 51885) by debbugs.gnu.org; 1 Dec 2021 04:30:00 +0000 Received: from localhost ([127.0.0.1]:42969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msHFn-0005vi-Of for submit@debbugs.gnu.org; Tue, 30 Nov 2021 23:30:00 -0500 Received: from out0.migadu.com ([94.23.1.103]:27077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msHFl-0005vN-Nl for 51885@debbugs.gnu.org; Tue, 30 Nov 2021 23:29:58 -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=1638332997; 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=3uXtbpFUUZhmivb/WAfTvqPlxY4+DByElYg7GAeNhm8=; b=fnEzoDUop+Q6hvvLfb1cZdoZCYyalliAvqZinQV2lTpQt1mDxN3Z4SMAE3Ml2gC9qJF6e2 JzgjbVh63sShBHdKxJEVjZfxb4Sn8dGPEgEoG3szg1p7bKp9K7dfpk6dbYto2daXwS8yxi W5b5+FWOf/t14mHlS4Yb85LpXjTFdGodzqvFVvZP3Ql6Vs9fFf7PSEYQGRz5G93kEvn7lB 00NeT1Dv5WkpUYdwE6UK07RV2DGwO5G42Gv+27pxdxbEMs75sCJ3vdLLFh3ntS50eks1fW ZXmuR35oML1NqdvVUy2dEjPUJk+kVfHQR2JUsxiOMq2iU9q6dXfahT45OI2yLw== Date: Tue, 30 Nov 2021 23:29:26 -0500 Message-Id: <20211201042927.18454-3-rg@raghavgururajan.name> In-Reply-To: <20211201042927.18454-1-rg@raghavgururajan.name> References: <20211201042927.18454-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 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Scanner: scn0.migadu.com X-TUID: mEErifBXWaWc * 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 2fe0d70a60..4b0f839b2a 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -74,6 +74,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