From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kJBpLuh3719mUwAA0tVLHw (envelope-from ) for ; Fri, 01 Jan 2021 19:28:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kFbCKeh3719gHQAA1q6Kng (envelope-from ) for ; Fri, 01 Jan 2021 19:28:40 +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 03E0C9404CD for ; Fri, 1 Jan 2021 19:28:40 +0000 (UTC) Received: from localhost ([::1]:50322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvQ6I-0003an-UB for larch@yhetil.org; Fri, 01 Jan 2021 14:28:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvQ5i-0003Iv-GW for guix-patches@gnu.org; Fri, 01 Jan 2021 14:28:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kvQ5h-0006m5-Pw for guix-patches@gnu.org; Fri, 01 Jan 2021 14:28:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kvQ5h-00052M-LP for guix-patches@gnu.org; Fri, 01 Jan 2021 14:28:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45601] [PATCH 2/6] gnu: vlang: Update to 0.2. Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Jan 2021 19:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45601 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45601@debbugs.gnu.org Received: via spool by 45601-submit@debbugs.gnu.org id=B45601.160952925819279 (code B ref 45601); Fri, 01 Jan 2021 19:28:01 +0000 Received: (at 45601) by debbugs.gnu.org; 1 Jan 2021 19:27:38 +0000 Received: from localhost ([127.0.0.1]:34897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kvQ5J-00050g-9l for submit@debbugs.gnu.org; Fri, 01 Jan 2021 14:27:38 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]:23190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kvQ5G-00050I-Vb for 45601@debbugs.gnu.org; Fri, 01 Jan 2021 14:27:35 -0500 Date: Fri, 01 Jan 2021 19:27:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609529248; bh=xalKzcFUf3PHIoT+dDOZnQjP92sozjwRvHwVr/qrPug=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=ZSIjmKiUdS1lTsiaeXofB0Mbi75M7Fy8bBtnGsY61IlLwpklsr34iIqvr2mehlyRU X0L6djXzlx3s5mHcDJxWPxCHbWs6SOf7LhXB0pMm7zB0EAC17zgpw4I5rvhZyG2AIP gUEGTfo8q+FrKSGCs6qpPuV5adEQGRV/Dry6rv00= Message-ID: <20210101192713.23655-2-rprior@protonmail.com> In-Reply-To: <20210101192713.23655-1-rprior@protonmail.com> References: <20210101192713.23655-1-rprior@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Ryan Prior , Ryan Prior via Guix-patches From: Ryan Prior via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.83 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=protonmail.com header.s=protonmail header.b=ZSIjmKiU; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 03E0C9404CD X-Spam-Score: -2.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: HRdXT5Qha+8V - Moves the cc-patching logic out of check into an explicit "patch-cc" st= age. - Adds "build-tools" stage to pre-build the included tools. - Sets native-search-paths. - Fixes many tests. --- gnu/packages/vlang.scm | 84 +++++++++++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 22 deletions(-) diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm index e0b2e7bcfc..212862cb1d 100644 --- a/gnu/packages/vlang.scm +++ b/gnu/packages/vlang.scm @@ -20,9 +20,13 @@ =20 (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 javascript) #:use-module (gnu packages xorg) #:use-module (guix build-system gnu) #:use-module (guix git-download) @@ -30,10 +34,21 @@ #:use-module (guix utils) #:use-module (guix packages)) =20 +(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.2") (source (origin (method git-fetch) @@ -42,7 +57,7 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1rqi7cah5nq8aggrib9xvdpfjxq20li91svv0w9yny6nn1ag7snx")))) + (base32 "1x2sf2j6xl11kjvv0i0anjqwsfb1la11xr7yhdnbix9808442wm2")))) (build-system gnu-build-system) (arguments `(#:make-flags @@ -61,42 +76,60 @@ (lambda _ (substitute* "Makefile" (("rm -rf") "true") - (("v self") (string-append "v -cc " ,(cc-for-target) " cmd/v= "))) + (("--branch") "")))) + (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")))) + #t)) + (add-after 'build 'build-tools + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "vmodules/markdown") "vmod= ules/markdown") + (setenv "VMODULES" (string-append (getcwd) "/vmodules")) + (invoke "./v" "build-tools" "-v") #t)) - (add-before 'check 'delete-failing-tests - ;; XXX As always, these should eventually be fixed and run. + (add-before 'check 'fix-or-delete-failing-tests (lambda _ + ;; The x64 tests copy .vv files into the test directory and th= en + ;; 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/da= te" + (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")) + "vlib/v/tests/repl/repl_test.v")) #t)) (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"))) + (when tests? + (invoke "./v" "test-fixed")) #t)) (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 i= n the ;; same directory. In a future release we may be able to mov= e ;; 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)) @@ -107,7 +140,7 @@ `(("vc" ;; Versions are not consistently tagged, but the matching commit wi= ll ;; probably have =E2=80=98v0.x.y=E2=80=99 in the commit message. - ,(let ((vc-version "b01d0fcda4b55861baa4be82e307cca4834b1641")) + ,(let ((vc-version "047460a4ae5f4a1ba8c31dc50ec5e50ebe80b7f6")) ;; 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 +154,20 @@ (commit vc-version))) (file-name (git-file-name "vc" vc-version)) (sha256 - (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f= "))))) + (base32 "1wlr9yzxz4bc7pbzbplzhjjr9sz5mwy2k2z5d3vwsnz56g245146= "))))) + ("vmodules/markdown" ,markdown-origin) =20 ;; 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 --=20 2.29.2