all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ryan Prior via Guix-patches via <guix-patches@gnu.org>
To: 44978@debbugs.gnu.org
Subject: [bug#44978] [PATCH 2/3] gnu: vlang: Use system tiny-bignum.
Date: Tue, 01 Dec 2020 04:15:21 +0000	[thread overview]
Message-ID: <20201201041510.8476-2-rprior@protonmail.com> (raw)
In-Reply-To: <20201201041510.8476-1-rprior@protonmail.com>

* 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
-- 
2.29.2






  reply	other threads:[~2020-12-01  4:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  1:44 [bug#44978] [PATCH] gnu: packages: Add tiny-bignum Ryan Prior via Guix-patches via
2020-12-01  4:10 ` [bug#44978] [PATCH] gnu: Add cjson Ryan Prior via Guix-patches via
2020-12-08  9:41   ` Christopher Baines
2020-12-01  4:15 ` [bug#44978] [PATCH 1/3] gnu: vlang: Update to 0.1.30 Ryan Prior via Guix-patches via
2020-12-01  4:15   ` Ryan Prior via Guix-patches via [this message]
2020-12-01  4:15   ` [bug#44978] [PATCH 3/3] gnu: vlang: Use system cJSON Ryan Prior via Guix-patches via
2020-12-06  4:59 ` [bug#44978] Update vlang Ryan Prior via Guix-patches via
2020-12-08  9:40 ` [bug#44978] [PATCH] gnu: packages: Add tiny-bignum Christopher Baines
2020-12-24  2:44 ` [bug#44978] Package v 0.1.30 in preparation for 0.2 Ryan Prior via Guix-patches via
2020-12-24 22:03   ` Leo Famulari
2021-01-01 19:47 ` [bug#44978] What remains to be done for bug#44978 Ryan Prior via Guix-patches via

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

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

  git send-email \
    --in-reply-to=20201201041510.8476-2-rprior@protonmail.com \
    --to=guix-patches@gnu.org \
    --cc=44978@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.