guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#45601] [PATCH 4/6] gnu: vlang: Use system cJSON.


From: Ryan Prior
Subject: [bug#45601] [PATCH 4/6] gnu: vlang: Use system cJSON.
Date: Fri, 01 Jan 2021 19:27:27 +0000

* gnu/packages/vlang.scm (vlang): Use system cJSON.
---
 gnu/packages/vlang.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index a2f6e93945..db7438d7f7 100644
--- a/gnu/packages/vlang.scm
+++ b/gnu/packages/vlang.scm
@@ -63,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
@@ -85,7 +86,10 @@
               (("--branch") ""))
             (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")
@@ -145,7 +149,8 @@
             #t)))))
    (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
-- 
2.29.2







reply via email to

[Prev in Thread] Current Thread [Next in Thread]