unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44978] [PATCH] gnu: packages: Add tiny-bignum.
@ 2020-12-01  1:44 Ryan Prior via Guix-patches via
  2020-12-01  4:10 ` [bug#44978] [PATCH] gnu: Add cjson Ryan Prior via Guix-patches via
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-12-01  1:44 UTC (permalink / raw)
  To: 44978

* gnu/packages/maths.scm (tiny-bignum): New variable.
---
 gnu/packages/maths.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d3f3539e26..a0dd9a761c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4984,6 +4984,52 @@ be fed to @command{tcalc} through the command line.")
   (home-page "https://sites.google.com/site/mohammedisam2000/tcalc")
   (license license:gpl3+)))
 
+(define-public tiny-bignum
+  (let ((commit "1d7a1f9b8e77316187a6b3eae8e68d60a6f9a4d4"))
+    (package
+     (name "tiny-bignum")
+     (version (git-version "0" "0" commit))
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/kokke/tiny-bignum-c")
+              (commit commit)))
+        (file-name (git-file-name "tiny-bignum" commit))
+        (sha256
+         (base32 "0vj71qlhlaa7d92bfar1kwqv6582dqrby8x3kdw0yzh82k2023g6"))))
+     (build-system gnu-build-system)
+     (arguments
+      `(#:phases
+        (modify-phases %standard-phases
+          (delete 'configure)
+          (replace 'check
+            (lambda _
+              (substitute* "scripts/test_rand.py"
+                (("\t") "  ")
+                (("\" % (\\w+)" _ symbol) (string-append "\" % int(" symbol ")")))
+              (invoke "make" "test")))
+          (replace 'install
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((share (string-append (assoc-ref outputs "out") "/share"))
+                    (doc (string-append (assoc-ref outputs "out") "/doc")))
+                (mkdir-p share)
+                (install-file "bn.c" share)
+                (install-file "bn.h" share)
+                (mkdir-p doc)
+                (install-file "LICENSE" doc)
+                (install-file "README.md" doc)))))))
+     (native-inputs
+      `(("python" ,python-wrapper)))
+     (home-page "https://github.com/kokke/tiny-bignum-c")
+     (synopsis "Small portable multiple-precision unsigned integer arithmetic in C")
+     (description
+      "This library provides portable Arbitrary-precision unsigned integer
+arithmetic in C, for calculating with large numbers.  Basic arithmetic (+, -,
+*, /, %) and bitwise operations (&, |, ^. <<, >>) plus increments, decrements
+and comparisons are supported.")
+     (license license:unlicense))))
+
 (define-public sundials
   (package
     (name "sundials")
-- 
2.29.2






^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#44978] [PATCH] gnu: Add cjson.
  2020-12-01  1:44 [bug#44978] [PATCH] gnu: packages: Add tiny-bignum Ryan Prior via Guix-patches via
@ 2020-12-01  4:10 ` 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
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-12-01  4:10 UTC (permalink / raw)
  To: 44978

* gnu/packages/web.scm (cjson): New variable.
---
 gnu/packages/web.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index f559d63f1b..21fc1ae964 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -957,6 +957,26 @@ project)
 @end itemize")
     (license license:bsd-2)))
 
+(define-public cjson
+  (package
+    (name "cjson")
+    (version "1.7.14")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/DaveGamble/cJSON")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "1rlnailhjm180zb6pc17jwphjwivw8kfpqgixjfgq4iyryq46sah"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags '("-DENABLE_CJSON_UTILS=On")))
+    (home-page "https://github.com/DaveGamble/cJSON")
+    (synopsis "JSON parser written in ANSI C")
+    (description "This library provides a portable embeddable JSON parser.")
+    (license license:expat)))
+
 (define-public qjson
   (package
     (name "qjson")
-- 
2.29.2






^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#44978] [PATCH 1/3] gnu: vlang: Update to 0.1.30.
  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-01  4:15 ` Ryan Prior via Guix-patches via
  2020-12-01  4:15   ` [bug#44978] [PATCH 2/3] gnu: vlang: Use system tiny-bignum Ryan Prior via Guix-patches via
  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
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 11+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-12-01  4:15 UTC (permalink / raw)
  To: 44978

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






^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#44978] [PATCH 2/3] gnu: vlang: Use system tiny-bignum.
  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
  2020-12-01  4:15   ` [bug#44978] [PATCH 3/3] gnu: vlang: Use system cJSON Ryan Prior via Guix-patches via
  1 sibling, 0 replies; 11+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-12-01  4:15 UTC (permalink / raw)
  To: 44978

* 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






^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#44978] [PATCH 3/3] gnu: vlang: Use system cJSON.
  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   ` [bug#44978] [PATCH 2/3] gnu: vlang: Use system tiny-bignum Ryan Prior via Guix-patches via
@ 2020-12-01  4:15   ` Ryan Prior via Guix-patches via
  1 sibling, 0 replies; 11+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-12-01  4:15 UTC (permalink / raw)
  To: 44978

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






^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#44978] Update vlang
  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-01  4:15 ` [bug#44978] [PATCH 1/3] gnu: vlang: Update to 0.1.30 Ryan Prior via Guix-patches via
@ 2020-12-06  4:59 ` Ryan Prior via Guix-patches via
  2020-12-08  9:40 ` [bug#44978] [PATCH] gnu: packages: Add tiny-bignum Christopher Baines
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-12-06  4:59 UTC (permalink / raw)
  To: 44978@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

Hi there! It would be good to get some feedback on this patch series, if you have any question or reservations!

Also, since it's related, some updates on vlang packaging efforts:

!
1) The next release will have support for multiple directores in the VMODULES environment variable, allowing us to use it as a search path similar to how we do GOPATH. This opens the door to a v-build-system and inclusion of packages for v libraries, which I'm researching how to contribute. This is the last v release where all the libraries have to be copied into a single directory.
2) The build system for compiling tools ahead-of-time has not been in good shape, but with some prodding from myself, it's improving. Hopefully by the next release we should have a fix for https://issues.guix.gnu.org/44978

Cheers,
Ryan

[-- Attachment #2: Type: text/html, Size: 1222 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#44978] [PATCH] gnu: packages: Add tiny-bignum.
  2020-12-01  1:44 [bug#44978] [PATCH] gnu: packages: Add tiny-bignum Ryan Prior via Guix-patches via
                   ` (2 preceding siblings ...)
  2020-12-06  4:59 ` [bug#44978] Update vlang Ryan Prior via Guix-patches via
@ 2020-12-08  9:40 ` 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
  2021-01-01 19:47 ` [bug#44978] What remains to be done for bug#44978 Ryan Prior via Guix-patches via
  5 siblings, 0 replies; 11+ messages in thread
From: Christopher Baines @ 2020-12-08  9:40 UTC (permalink / raw)
  To: Ryan Prior; +Cc: 44978

[-- Attachment #1: Type: text/plain, Size: 3806 bytes --]


Hey, I've pushed this to master as
ab58b2cc32068fc9e5f0a7c7ae112349943b7dfd with a few changes.


Ryan Prior via Guix-patches via <guix-patches@gnu.org> writes:

> * gnu/packages/maths.scm (tiny-bignum): New variable.

I removed packages: from the commit message, I think just gnu: Add
foo. is the convention.

> ---
>  gnu/packages/maths.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
>
> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
> index d3f3539e26..a0dd9a761c 100644
> --- a/gnu/packages/maths.scm
> +++ b/gnu/packages/maths.scm
> @@ -4984,6 +4984,52 @@ be fed to @command{tcalc} through the command line.")
>    (home-page "https://sites.google.com/site/mohammedisam2000/tcalc")
>    (license license:gpl3+)))
>  
> +(define-public tiny-bignum
> +  (let ((commit "1d7a1f9b8e77316187a6b3eae8e68d60a6f9a4d4"))
> +    (package
> +     (name "tiny-bignum")
> +     (version (git-version "0" "0" commit))
> +     (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +              (url "https://github.com/kokke/tiny-bignum-c")
> +              (commit commit)))
> +        (file-name (git-file-name "tiny-bignum" commit))
> +        (sha256
> +         (base32 "0vj71qlhlaa7d92bfar1kwqv6582dqrby8x3kdw0yzh82k2023g6"))))
> +     (build-system gnu-build-system)
> +     (arguments
> +      `(#:phases
> +        (modify-phases %standard-phases
> +          (delete 'configure)
> +          (replace 'check
> +            (lambda _
> +              (substitute* "scripts/test_rand.py"
> +                (("\t") "  ")
> +                (("\" % (\\w+)" _ symbol) (string-append "\" % int(" symbol ")")))
> +              (invoke "make" "test")))

I split this phase, so 'check just does the testing, and I tweaked it to
use the tests? argument.

> +          (replace 'install
> +            (lambda* (#:key outputs #:allow-other-keys)
> +              (let ((share (string-append (assoc-ref outputs "out") "/share"))
> +                    (doc (string-append (assoc-ref outputs "out") "/doc")))
> +                (mkdir-p share)
> +                (install-file "bn.c" share)
> +                (install-file "bn.h" share)
> +                (mkdir-p doc)
> +                (install-file "LICENSE" doc)
> +                (install-file "README.md" doc)))))))

The build output showed:

## WARNING: phase `install' returned `#<unspecified>'.  Return values other than #t
## are deprecated.  Please migrate this package so that its phase
## procedures report errors by raising an exception, and otherwise
## always return #t.

So I added #t at the end.

> +     (native-inputs
> +      `(("python" ,python-wrapper)))
> +     (home-page "https://github.com/kokke/tiny-bignum-c")
> +     (synopsis "Small portable multiple-precision unsigned integer arithmetic in C")
> +     (description
> +      "This library provides portable Arbitrary-precision unsigned integer
> +arithmetic in C, for calculating with large numbers.  Basic arithmetic (+, -,
> +*, /, %) and bitwise operations (&, |, ^. <<, >>) plus increments, decrements
> +and comparisons are supported.")
> +     (license license:unlicense))))
> +
>  (define-public sundials
>    (package
>      (name "sundials")

Final thing, I'm not sure the location of the bn.c and bn.h files in the
output are particularly conventional. I'd expect the .h file to be in
include I think, rather than share. Also, with a C library, I think
you'd expect to have a .so file in lib, and the .c file not to be
included. Looking ahead to where you're using this, I think I see why
you've done it this way, but it could mean that using this package is
harder in other packages.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#44978] [PATCH] gnu: Add cjson.
  2020-12-01  4:10 ` [bug#44978] [PATCH] gnu: Add cjson Ryan Prior via Guix-patches via
@ 2020-12-08  9:41   ` Christopher Baines
  0 siblings, 0 replies; 11+ messages in thread
From: Christopher Baines @ 2020-12-08  9:41 UTC (permalink / raw)
  To: Ryan Prior; +Cc: 44978

[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]


Hey, I pushed this to master as
ab58b2cc32068fc9e5f0a7c7ae112349943b7dfd.

The only thing I changed here is I moved the package in to the
javascript module, as that seemed more appropriate than the web module.

Ryan Prior via Guix-patches via <guix-patches@gnu.org> writes:

> * gnu/packages/web.scm (cjson): New variable.
> ---
>  gnu/packages/web.scm | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index f559d63f1b..21fc1ae964 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -957,6 +957,26 @@ project)
>  @end itemize")
>      (license license:bsd-2)))
>  
> +(define-public cjson
> +  (package
> +    (name "cjson")
> +    (version "1.7.14")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/DaveGamble/cJSON")
> +                    (commit (string-append "v" version))))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32 "1rlnailhjm180zb6pc17jwphjwivw8kfpqgixjfgq4iyryq46sah"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:configure-flags '("-DENABLE_CJSON_UTILS=On")))
> +    (home-page "https://github.com/DaveGamble/cJSON")
> +    (synopsis "JSON parser written in ANSI C")
> +    (description "This library provides a portable embeddable JSON parser.")
> +    (license license:expat)))
> +
>  (define-public qjson
>    (package
>      (name "qjson")


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#44978] Package v 0.1.30 in preparation for 0.2
  2020-12-01  1:44 [bug#44978] [PATCH] gnu: packages: Add tiny-bignum Ryan Prior via Guix-patches via
                   ` (3 preceding siblings ...)
  2020-12-08  9:40 ` [bug#44978] [PATCH] gnu: packages: Add tiny-bignum Christopher Baines
@ 2020-12-24  2:44 ` 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
  5 siblings, 1 reply; 11+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-12-24  2:44 UTC (permalink / raw)
  To: 44978@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

Hi there! Bumping this again since vlang recently released 0.2, a major release has has a number of goodies I've asked for to help improve the quality of our package. I'm beginning the work to update our package to 0.2, and hopefully will also succeed at moving a few more of the vendored sources out into dedicated packages.

If I can get any feedback on this patch series it would be very appreciated!

[-- Attachment #2: Type: text/html, Size: 883 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#44978] Package v 0.1.30 in preparation for 0.2
  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
  0 siblings, 0 replies; 11+ messages in thread
From: Leo Famulari @ 2020-12-24 22:03 UTC (permalink / raw)
  To: 44978

On Thu, Dec 24, 2020 at 02:44:57AM +0000, Ryan Prior via Guix-patches via wrote:
> Hi there! Bumping this again since vlang recently released 0.2, a major release has has a number of goodies I've asked for to help improve the quality of our package. I'm beginning the work to update our package to 0.2, and hopefully will also succeed at moving a few more of the vendored sources out into dedicated packages.
> 
> If I can get any feedback on this patch series it would be very appreciated!

It looks like some parts of the patch series have been pushed. Can you
clarify what remains to be done? For example, attach your proposed
further work to a reply message.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#44978] What remains to be done for bug#44978
  2020-12-01  1:44 [bug#44978] [PATCH] gnu: packages: Add tiny-bignum Ryan Prior via Guix-patches via
                   ` (4 preceding siblings ...)
  2020-12-24  2:44 ` [bug#44978] Package v 0.1.30 in preparation for 0.2 Ryan Prior via Guix-patches via
@ 2021-01-01 19:47 ` Ryan Prior via Guix-patches via
  5 siblings, 0 replies; 11+ messages in thread
From: Ryan Prior via Guix-patches via @ 2021-01-01 19:47 UTC (permalink / raw)
  To: 44978@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 87 bytes --]

Thanks Leo! I published a new patch series which obsoletes this one. See debbugs 45601.

[-- Attachment #2: Type: text/html, Size: 102 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-01 19:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [bug#44978] [PATCH 2/3] gnu: vlang: Use system tiny-bignum Ryan Prior via Guix-patches via
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

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).