From patchwork Tue Dec 1 04:15:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ryan Prior X-Patchwork-Id: 25501 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 9768F27BBF8; Tue, 1 Dec 2020 04:16:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6511427BBF9 for ; Tue, 1 Dec 2020 04:16:14 +0000 (GMT) Received: from localhost ([::1]:39572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjx5J-0000us-Gr for patchwork@mira.cbaines.net; Mon, 30 Nov 2020 23:16:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjx59-0000sa-60 for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45857) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjx58-0007AI-Ka for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjx58-0002qc-Go for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44978] [PATCH 1/3] gnu: vlang: Update to 0.1.30. References: <20201201014454.18663-1-rprior@protonmail.com> In-Reply-To: <20201201014454.18663-1-rprior@protonmail.com> Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Dec 2020 04:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44978@debbugs.gnu.org Received: via spool by 44978-submit@debbugs.gnu.org id=B44978.160679612710874 (code B ref 44978); Tue, 01 Dec 2020 04:16:02 +0000 Received: (at 44978) by debbugs.gnu.org; 1 Dec 2020 04:15:27 +0000 Received: from localhost ([127.0.0.1]:57397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjx4Y-0002pK-Ou for submit@debbugs.gnu.org; Mon, 30 Nov 2020 23:15:27 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:32103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjx4W-0002p1-0b for 44978@debbugs.gnu.org; Mon, 30 Nov 2020 23:15:25 -0500 Date: Tue, 01 Dec 2020 04:15:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1606796117; bh=FEe9YaSGdXl8aVgPhvaKCxbNUtSf7cMV2yKA99SbtaI=; h=Date:To:From:Reply-To:Subject:From; b=g4tNjUR+JO4bfmOygBAWz9EGcASqfJ7aMJGOTCc52OJcrLytgCDUpB3kKjBBcTmU7 N7eNOcPKyLCNKcqR6T1g/4dU1TXR5G08sF7uvrJDg/65sYu793g61S9gY1268nN32f 1VLW+uj+4fWCtL30ZJFdhbyaijvvDBK+XQUeTIFU= Message-ID: <20201201041510.8476-1-rprior@protonmail.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" Reply-to: Ryan Prior , Ryan Prior via Guix-patches X-Patchwork-Original-From: Ryan Prior via Guix-patches via From: Ryan Prior X-getmail-retrieved-from-mailbox: Patches * gnu/packages/vlang.scm (vlang): Update to 0.1.30. - Moves the cc-patching logic out of check into an explicit "patch-cc" stage. - Adds "build-tools" stage to pre-build the included tools. - Sets native-search-paths. - Fixes many tests. --- gnu/packages/vlang.scm | 89 +++++++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index e0b2e7bcfc..655a77fadc 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -20,9 +20,12 @@ (define-module (gnu packages vlang) #:use-module (gnu packages glib) + #:use-module (gnu packages linux) #:use-module (gnu packages node) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) + #:use-module (gnu packages valgrind) + #:use-module (gnu packages version-control) #:use-module (gnu packages xorg) #:use-module (guix build-system gnu) #:use-module (guix git-download) @@ -30,10 +33,21 @@ #:use-module (guix utils) #:use-module (guix packages)) +(define markdown-origin + (let ((markdown-version "1ccfbcba945b649b61738b9c0455d31cf99564b2")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vlang/markdown") + (commit markdown-version))) + (file-name (git-file-name "vlang-markdown" markdown-version)) + (sha256 + (base32 "0s982qiwy4s9y07x9fsy4yn642schplhp9hrw2libg2bx4sw43as"))))) + (define-public vlang (package (name "vlang") - (version "0.1.29") + (version "0.1.30") (source (origin (method git-fetch) @@ -42,7 +56,7 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1rqi7cah5nq8aggrib9xvdpfjxq20li91svv0w9yny6nn1ag7snx")))) + (base32 "0adpjmb8ak4hsbm7iqrx4b5s1a99sc9byg5ah6c1whhsxm781k9r")))) (build-system gnu-build-system) (arguments `(#:make-flags @@ -60,54 +74,66 @@ (add-before 'build 'patch-makefile (lambda _ (substitute* "Makefile" - (("rm -rf") "true") - (("v self") (string-append "v -cc " ,(cc-for-target) " cmd/v"))) - #t)) - (add-before 'check 'delete-failing-tests - ;; XXX As always, these should eventually be fixed and run. + (("rm -rf") "true")))) + (add-before 'build 'patch-cc + (lambda _ + (let* ((bin "tmp/bin") + (gcc (which "gcc"))) + (mkdir-p bin) + (symlink gcc (string-append bin "/cc")) + (setenv "PATH" (string-append bin ":" (getenv "PATH")))))) + (add-after 'build 'build-tools + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "vmodules/markdown") "vmodules/markdown") + (setenv "VMODULES" (string-append (getcwd) "/vmodules")) + (invoke "./v" "build-tools" "-v"))) + (add-before 'check 'fix-or-delete-failing-tests (lambda _ + ;; The x64 tests copy .vv files into the test directory and then + ;; write to them, so we need to make them writeable. + (for-each (lambda (vv) (chmod vv #o644)) + (find-files "vlib/v/gen/x64/tests/" "\\.vv$")) + ;; The process test explicitly calls "/bin/sleep" and "/bin/date" + (substitute* "vlib/os/process_test.v" + (("/bin/sleep") (which "sleep")) + (("/bin/date") (which "date"))) + ;; The valgrind test can't find `cc' even though it's on PATH, so + ;; we pass it as an explicit argument. + (substitute* "vlib/v/tests/valgrind/valgrind_test.v" + (("\\$vexe") "$vexe -cc gcc")) (for-each delete-file - '("vlib/v/gen/x64/tests/x64_test.v" - "vlib/v/tests/repl/repl_test.v" - "vlib/v/tests/valgrind/valgrind_test.v" - "vlib/v/tests/valgrind/strings_and_arrays.vv" + '(;; XXX As always, these should eventually be fixed and run. + "vlib/vweb/tests/vweb_test.v" "vlib/v/tests/live_test.v" - "vlib/net/websocket/ws_test.v")) - #t)) + "vlib/v/tests/repl/repl_test.v")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) - (let* ((bin "tmp/bin") - (gcc (which "gcc"))) - (when tests? - (mkdir-p bin) - (symlink gcc (string-append bin "/cc")) - (setenv "PATH" (string-append bin ":" (getenv "PATH"))) - (invoke "./v" "test-fixed"))) - #t)) + (when tests? + (invoke "./v" "test-fixed")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) - (tools (string-append bin "/cmd/tools")) + (cmd (string-append bin "/cmd")) (thirdparty (string-append bin "/thirdparty")) (vlib (string-append bin "/vlib")) + (vmodules (string-append bin "/vmodules")) (vmod (string-append bin "/v.mod"))) (mkdir-p bin) (copy-file "./v" (string-append bin "/v")) ;; v requires as of 0.1.27 that these other components are in the ;; same directory. In a future release we may be able to move ;; these into other output folders. - (copy-recursively "cmd/tools" tools) + (copy-recursively "cmd" cmd) (copy-recursively "thirdparty" thirdparty) (copy-recursively "vlib" vlib) - (copy-file "v.mod" vmod)) - #t))))) + (copy-file "v.mod" vmod))))))) (inputs `(("glib" ,glib))) (native-inputs `(("vc" ;; Versions are not consistently tagged, but the matching commit will ;; probably have ‘v0.x.y’ in the commit message. - ,(let ((vc-version "b01d0fcda4b55861baa4be82e307cca4834b1641")) + ,(let ((vc-version "e8da48b5e44c3671cf5fc649cae5c38983b1ff52")) ;; v bootstraps from generated c source code from a dedicated ;; repository. It's readable, as generated source goes, and not at all ;; obfuscated, and it's about 15kb. The original source written in @@ -121,13 +147,20 @@ (commit vc-version))) (file-name (git-file-name "vc" vc-version)) (sha256 - (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f"))))) + (base32 "066q54nnpaainmnvzkhl65nw6b5l18fyshgv7g0zwqldnc60pv1r"))))) + ("vmodules/markdown" ,markdown-origin) ;; For the tests. ("libx11" ,libx11) ("node" ,node) ("openssl" ,openssl) - ("sqlite" ,sqlite))) + ("ps" ,procps) + ("sqlite" ,sqlite) + ("valgrind" ,valgrind))) + (native-search-paths + (list (search-path-specification + (variable "VMODULES") + (files '("bin/"))))) (home-page "https://vlang.io/") (synopsis "Compiler for the V programming language") (description From patchwork Tue Dec 1 04:15:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Prior X-Patchwork-Id: 25502 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 D6EB127BBF9; Tue, 1 Dec 2020 04:16:36 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A3A6127BBF8 for ; Tue, 1 Dec 2020 04:16:36 +0000 (GMT) Received: from localhost ([::1]:40014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjx5f-00016L-Sp for patchwork@mira.cbaines.net; Mon, 30 Nov 2020 23:16:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjx59-0000sw-Db for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjx59-0007AN-5X for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjx58-0002qj-TS for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44978] [PATCH 2/3] gnu: vlang: Use system tiny-bignum. Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Dec 2020 04:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44978@debbugs.gnu.org Received: via spool by 44978-submit@debbugs.gnu.org id=B44978.160679613110892 (code B ref 44978); Tue, 01 Dec 2020 04:16:02 +0000 Received: (at 44978) by debbugs.gnu.org; 1 Dec 2020 04:15:31 +0000 Received: from localhost ([127.0.0.1]:57400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjx4d-0002pc-6e for submit@debbugs.gnu.org; Mon, 30 Nov 2020 23:15:31 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:21621) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjx4b-0002pA-HL for 44978@debbugs.gnu.org; Mon, 30 Nov 2020 23:15:29 -0500 Date: Tue, 01 Dec 2020 04:15:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1606796123; bh=+KMMLVkj4xDLZSb+UM38swaV0PY1rwN3wuscyt3BGUQ=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=q0g1MjznyROBqP86c+ciSrT1AAEVrAv1dBKNXIgiLPeJt10pUySmP7t+cSyxWa/+Z XaugfAsNGv2win0aP1JWHnvOCUyw+W/Mwa1/EpWlFl1Sdod5cyKvh5VuXjUuV2sTf8 8DCW2sjen+wKROdx/VQyj34Z5l3zBe2x2kaunMGw= Message-ID: <20201201041510.8476-2-rprior@protonmail.com> In-Reply-To: <20201201041510.8476-1-rprior@protonmail.com> References: <20201201041510.8476-1-rprior@protonmail.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" Reply-to: Ryan Prior , Ryan Prior via Guix-patches X-Patchwork-Original-From: Ryan Prior via Guix-patches via From: Ryan Prior X-getmail-retrieved-from-mailbox: Patches * gnu/packages/vlang.scm (vlang): Update to use system tiny-bignum. --- gnu/packages/vlang.scm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index 655a77fadc..83bacfc6c3 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -21,6 +21,7 @@ (define-module (gnu packages vlang) #:use-module (gnu packages glib) #:use-module (gnu packages linux) + #:use-module (gnu packages maths) #:use-module (gnu packages node) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) @@ -56,7 +57,12 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0adpjmb8ak4hsbm7iqrx4b5s1a99sc9byg5ah6c1whhsxm781k9r")))) + (base32 "0adpjmb8ak4hsbm7iqrx4b5s1a99sc9byg5ah6c1whhsxm781k9r")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Eventually remove the whole thirdparty directory. + (delete-file-recursively "thirdparty/bignum"))))) (build-system gnu-build-system) (arguments `(#:make-flags @@ -71,10 +77,13 @@ #:phases (modify-phases %standard-phases (delete 'configure) - (add-before 'build 'patch-makefile - (lambda _ + (add-before 'build 'patch-files + (lambda* (#:key inputs #:allow-other-keys) (substitute* "Makefile" - (("rm -rf") "true")))) + (("rm -rf") "true")) + (substitute* "vlib/math/big/big.v" + (("@VROOT/thirdparty/bignum") + (string-append (assoc-ref inputs "tiny-bignum") "/share"))))) (add-before 'build 'patch-cc (lambda _ (let* ((bin "tmp/bin") @@ -128,7 +137,8 @@ (copy-recursively "vlib" vlib) (copy-file "v.mod" vmod))))))) (inputs - `(("glib" ,glib))) + `(("glib" ,glib) + ("tiny-bignum" ,tiny-bignum))) (native-inputs `(("vc" ;; Versions are not consistently tagged, but the matching commit will From patchwork Tue Dec 1 04:15:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Prior X-Patchwork-Id: 25503 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 3E1B227BBF9; Tue, 1 Dec 2020 04:16:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E8D0F27BBF8 for ; Tue, 1 Dec 2020 04:16:41 +0000 (GMT) Received: from localhost ([::1]:40256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjx5l-0001Cc-5n for patchwork@mira.cbaines.net; Mon, 30 Nov 2020 23:16:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjx59-0000tE-Kw for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjx59-0007AT-DL for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjx59-0002qr-99 for guix-patches@gnu.org; Mon, 30 Nov 2020 23:16:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44978] [PATCH 3/3] gnu: vlang: Use system cJSON. Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Dec 2020 04:16:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44978@debbugs.gnu.org Received: via spool by 44978-submit@debbugs.gnu.org id=B44978.160679614410918 (code B ref 44978); Tue, 01 Dec 2020 04:16:03 +0000 Received: (at 44978) by debbugs.gnu.org; 1 Dec 2020 04:15:44 +0000 Received: from localhost ([127.0.0.1]:57403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjx4p-0002q2-LD for submit@debbugs.gnu.org; Mon, 30 Nov 2020 23:15:43 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:58552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjx4n-0002po-6g for 44978@debbugs.gnu.org; Mon, 30 Nov 2020 23:15:42 -0500 Date: Tue, 01 Dec 2020 04:15:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1606796134; bh=H8derxvStelvFIUaNBBjIADYeYqtaX8iBrPTBWEI5JA=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=GBUmKSrlLifF5XY+31udTsHekS3wRnCsID088onWtztX+VQIG0rdd2yGI/+IgqCiK +39+3cyjPZ6ApBazmGlEzVPRIW5vqIfPJAtksa5dKcpy6gk00S3jXm0tj7CW0YyTyR I3GUUqqsnNB6LaOy/UeLKliNZXDpZb5l9DyBptm8= Message-ID: <20201201041510.8476-3-rprior@protonmail.com> In-Reply-To: <20201201041510.8476-1-rprior@protonmail.com> References: <20201201041510.8476-1-rprior@protonmail.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" Reply-to: Ryan Prior , Ryan Prior via Guix-patches X-Patchwork-Original-From: Ryan Prior via Guix-patches via From: Ryan Prior X-getmail-retrieved-from-mailbox: Patches * gnu/packages/vlang.scm (vlang): Use system cJSON. --- gnu/packages/vlang.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index 83bacfc6c3..334901ffb6 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages tls) #:use-module (gnu packages valgrind) #:use-module (gnu packages version-control) + #:use-module (gnu packages web) #:use-module (gnu packages xorg) #:use-module (guix build-system gnu) #:use-module (guix git-download) @@ -62,7 +63,8 @@ (snippet '(begin ;; Eventually remove the whole thirdparty directory. - (delete-file-recursively "thirdparty/bignum"))))) + (delete-file-recursively "thirdparty/bignum") + (delete-file-recursively "thirdparty/cJSON"))))) (build-system gnu-build-system) (arguments `(#:make-flags @@ -83,7 +85,10 @@ (("rm -rf") "true")) (substitute* "vlib/math/big/big.v" (("@VROOT/thirdparty/bignum") - (string-append (assoc-ref inputs "tiny-bignum") "/share"))))) + (string-append (assoc-ref inputs "tiny-bignum") "/share"))) + (substitute* "vlib/json/json_primitives.v" + (("@VROOT/thirdparty/cJSON") + (assoc-ref inputs "cJSON"))))) (add-before 'build 'patch-cc (lambda _ (let* ((bin "tmp/bin") @@ -138,7 +143,8 @@ (copy-file "v.mod" vmod))))))) (inputs `(("glib" ,glib) - ("tiny-bignum" ,tiny-bignum))) + ("tiny-bignum" ,tiny-bignum) + ("cJSON" ,(package-source cjson)))) (native-inputs `(("vc" ;; Versions are not consistently tagged, but the matching commit will