unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Ryan Prior via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 43821@debbugs.gnu.org
Subject: bug#43821: [PATCH 1/1] gnu: vlang: Build included tools at package time.
Date: Tue, 06 Oct 2020 05:03:41 +0000	[thread overview]
Message-ID: <20201006050329.6648-2-rprior@protonmail.com> (raw)
In-Reply-To: <20201006050329.6648-1-rprior@protonmail.com>

* gnu/packages/vlang.scm (vlang): Updates build stages.
  - Moves the cc-patching logic out of check into an explicit "patch-cc" stage
  - Adds "build-tools" stage to pre-build the included tools
---
 gnu/packages/vlang.scm | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index 6f6aa79ce5..47060934d4 100644
--- a/gnu/packages/vlang.scm
+++ b/gnu/packages/vlang.scm
@@ -22,6 +22,7 @@
   #:use-module (gnu packages node)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages xorg)
   #:use-module (guix build-system gnu)
   #:use-module (guix git-download)
@@ -61,6 +62,18 @@
               (("rm -rf") "true")
               (("v self") "v -cc gcc cmd/v"))
             #t))
+        (add-after '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 'patch-cc 'build-tools
+          (lambda _
+            (invoke "./v" "build-tools" "-v")
+            #t))
         (add-before 'check 'delete-failing-tests
           ;; XXX As always, these should eventually be fixed and run.
           (lambda _
@@ -74,13 +87,8 @@
             #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 _
@@ -121,6 +129,9 @@
             (sha256
              (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f")))))
 
+      ;; For build-tools
+      ("git" ,git)
+
       ;; For the tests.
       ("libx11" ,libx11)
       ("node" ,node)
-- 
2.17.1






      reply	other threads:[~2020-10-06  7:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 23:30 bug#43821: Vlang REPL broken Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-10-06  5:03 ` bug#43821: [PATCH 0/1] Progress improving vlang package Ryan Prior via Bug reports for GNU Guix
2020-10-06  5:03   ` Ryan Prior via Bug reports for GNU Guix [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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20201006050329.6648-2-rprior@protonmail.com \
    --to=bug-guix@gnu.org \
    --cc=43821@debbugs.gnu.org \
    --cc=rprior@protonmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).