[PATCH 0/6] vlang 0.2 update

OpenSubmitted by Ryan Prior.
Details
3 participants
  • Leo Famulari
  • Christopher Baines
  • Ryan Prior
Owner
unassigned
Severity
normal
R
R
Ryan Prior wrote on 1 Jan 2021 20:23
(address . guix-patches@gnu.org)
20210101192319.23494-1-rprior@protonmail.com
Hi Guix! The vlang compiler had its 0.2 release recently and I've been working on improving the quality of our package as well. This patch series has 4 exciting improvements:

1. The compiler is updated to 0.2, which already includes a number of changes to the build system to make things work better for Guix users.
2. Three vendored dependencies are factored out into their own Guix packages: tiny-bignu, cJSON, and wyhash.
3. A number of tests that were failing have been patched to succeed. The number of tests we skip is down to three.
4. The v tools now work out of the box, with some exceptions such as the REPL that rely on `cc`.

I am continuing the work to move the last of the vendored dependencies into their own packages, get all the tests passing, and get us to a working v repl. But this series already gets us a lot closer to where I want to be.

This patch series also relates to issues 43821 and 44978.

Cheers,
Ryan

Ryan Prior (6):
gnu: Add wyhash.
gnu: vlang: Update to 0.2.
gnu: vlang: Use system tiny-bignum.
gnu: vlang: Use system cJSON.
gnu: vlang: Use system wyhash.
gnu: vlang: Fix v tools.

gnu/local.mk | 1 +
gnu/packages/datastructures.scm | 34 ++++-
.../vlang-accommodate-timestamps.patch | 50 ++++++++
gnu/packages/vlang.scm | 119 ++++++++++++++----
4 files changed, 178 insertions(+), 26 deletions(-)
create mode 100644 gnu/packages/patches/vlang-accommodate-timestamps.patch

--
2.29.2
R
R
Ryan Prior wrote on 1 Jan 2021 20:27
[PATCH 2/6] gnu: vlang: Update to 0.2.
(address . 45601@debbugs.gnu.org)
20210101192713.23655-2-rprior@protonmail.com
- 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 | 84 +++++++++++++++++++++++++++++++-----------
1 file changed, 62 insertions(+), 22 deletions(-)

Toggle diff (162 lines)
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 @@
 
 (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))
 
+(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") "vmodules/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 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"))
+                        "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 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))
@@ -107,7 +140,7 @@
     `(("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 "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)
 
       ;; 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
R
R
Ryan Prior wrote on 1 Jan 2021 20:27
[PATCH 1/6] gnu: Add wyhash.
(address . 45601@debbugs.gnu.org)
20210101192713.23655-1-rprior@protonmail.com
* gnu/packages/datastructures.scm (wyhash): New variable.
---
gnu/packages/datastructures.scm | 34 ++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/datastructures.scm b/gnu/packages/datastructures.scm
index 2911a0c550..49e363d09e 100644
--- a/gnu/packages/datastructures.scm
+++ b/gnu/packages/datastructures.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2020 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,7 +34,38 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system meson))
+  #:use-module (guix build-system meson)
+  #:use-module (guix build-system trivial))
+
+(define-public wyhash
+  (package
+    (name "wyhash")
+    (version "5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/wangyi-fudan/wyhash")
+                    (commit (string-append "wyhash_v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "03ljs5iw9zrm3bydwggjvpwrcwmsd75h3dv1j4am4hw3h22cjdjc"))))
+    (build-system trivial-build-system) ;; source-only package
+    (arguments
+     '(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((dest (string-append (assoc-ref %outputs "out") "/include")))
+           (mkdir-p dest)
+           (chdir (assoc-ref %build-inputs "source"))
+           (install-file "wyhash.h" dest))
+         #t)))
+    (home-page "https://github.com/wangyi-fudan/wyhash")
+    (synopsis "Embeddable hash function and random number generator.")
+    (description "This package provides a portable hash function and random
+number generator suitable for use in data structures.  Provided by default in
+Zig, V, and Nim programming language standard libraries.")
+    (license license:unlicense)))
 
 (define-public gdsl
   (package
-- 
2.29.2
R
R
Ryan Prior wrote on 1 Jan 2021 20:27
[PATCH 3/6] gnu: vlang: Use system tiny-bignum.
(address . 45601@debbugs.gnu.org)
20210101192713.23655-3-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(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index 212862cb1d..a2f6e93945 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)
@@ -57,7 +58,12 @@
            (commit version)))
      (file-name (git-file-name name version))
      (sha256
-      (base32 "1x2sf2j6xl11kjvv0i0anjqwsfb1la11xr7yhdnbix9808442wm2"))))
+      (base32 "1x2sf2j6xl11kjvv0i0anjqwsfb1la11xr7yhdnbix9808442wm2"))
+     (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
@@ -72,11 +78,14 @@
       #: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")
-              (("--branch") ""))))
+              (("--branch") ""))
+            (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")
@@ -135,7 +144,8 @@
               (copy-file "v.mod" vmod))
             #t)))))
    (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
R
R
Ryan Prior wrote on 1 Jan 2021 20:27
[PATCH 4/6] gnu: vlang: Use system cJSON.
(address . 45601@debbugs.gnu.org)
20210101192713.23655-4-rprior@protonmail.com
* gnu/packages/vlang.scm (vlang): Use system cJSON.
---
gnu/packages/vlang.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

Toggle diff (38 lines)
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
R
R
Ryan Prior wrote on 1 Jan 2021 20:27
[PATCH 6/6] gnu: vlang: Fix v tools.
(address . 45601@debbugs.gnu.org)
20210101192713.23655-6-rprior@protonmail.com
---
gnu/local.mk | 1 +
.../vlang-accommodate-timestamps.patch | 50 +++++++++++++++++++
gnu/packages/vlang.scm | 7 +++
3 files changed, 58 insertions(+)
create mode 100644 gnu/packages/patches/vlang-accommodate-timestamps.patch

Toggle diff (95 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 2402b1e349..168c499976 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1702,6 +1702,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/vinagre-newer-freerdp.patch             \
   %D%/packages/patches/vinagre-newer-rdp-parameters.patch      \
   %D%/packages/patches/virglrenderer-CVE-2017-6386.patch 	\
+  %D%/packages/patches/vlang-accommodate-timestamps.patch 	\
   %D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch		\
   %D%/packages/patches/vorbis-tools-CVE-2014-9640.patch		\
   %D%/packages/patches/vorbis-tools-CVE-2015-6749.patch		\
diff --git a/gnu/packages/patches/vlang-accommodate-timestamps.patch b/gnu/packages/patches/vlang-accommodate-timestamps.patch
new file mode 100644
index 0000000000..02171ac6cf
--- /dev/null
+++ b/gnu/packages/patches/vlang-accommodate-timestamps.patch
@@ -0,0 +1,50 @@
+From 64e7c548843c7938fcfa6b697108d28aa26f4d69 Mon Sep 17 00:00:00 2001
+From: Ryan Prior <rprior@protonmail.com>
+Date: Thu, 31 Dec 2020 02:31:38 -0600
+Subject: [PATCH] v.util: accomodate reproducible build environments like guix,
+ by not recompiling cmd/tools when mtime < 1024 (#7702)
+
+---
+ vlib/v/util/util.v | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/vlib/v/util/util.v b/vlib/v/util/util.v
+index 811b71585..1ed32bacf 100644
+--- a/vlib/v/util/util.v
++++ b/vlib/v/util/util.v
+@@ -179,7 +179,10 @@ pub fn should_recompile_tool(vexe string, tool_source string) bool {
+ 	if !os.exists(tool_exe) {
+ 		should_compile = true
+ 	} else {
+-		if os.file_last_mod_unix(tool_exe) <= os.file_last_mod_unix(vexe) {
++		mtime_vexe := os.file_last_mod_unix(vexe)
++		mtime_tool_exe := os.file_last_mod_unix(tool_exe)
++		mtime_tool_source := os.file_last_mod_unix(tool_source)
++		if mtime_tool_exe <= mtime_vexe {
+ 			// v was recompiled, maybe after v up ...
+ 			// rebuild the tool too just in case
+ 			should_compile = true
+@@ -192,10 +195,19 @@ pub fn should_recompile_tool(vexe string, tool_source string) bool {
+ 				should_compile = false
+ 			}
+ 		}
+-		if os.file_last_mod_unix(tool_exe) <= os.file_last_mod_unix(tool_source) {
++		if mtime_tool_exe <= mtime_tool_source {
+ 			// the user changed the source code of the tool, or git updated it:
+ 			should_compile = true
+ 		}
++		// GNU Guix and possibly other environments, have bit for bit reproducibility in mind,
++		// including filesystem attributes like modification times, so they set the modification
++		// times of executables to a small number like 0, 1 etc. In this case, we should not
++		// recompile even if other heuristics say that we should. Users in such environments,
++		// have to explicitly do: `v cmd/tools/vfmt.v`, and/or install v from source, and not
++		// use the system packaged one, if they desire to develop v itself.
++		if mtime_vexe < 1024 && mtime_tool_exe < 1024 {
++			should_compile = false
++		}
+ 	}
+ 	return should_compile
+ }
+-- 
+2.29.2
+
diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index 92d178a3e1..3bdbf36f9d 100644
--- a/gnu/packages/vlang.scm
+++ b/gnu/packages/vlang.scm
@@ -30,6 +30,7 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages javascript)
   #:use-module (gnu packages xorg)
+  #:use-module (gnu packages)
   #:use-module (guix build-system gnu)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
@@ -61,6 +62,12 @@
      (sha256
       (base32 "1x2sf2j6xl11kjvv0i0anjqwsfb1la11xr7yhdnbix9808442wm2"))
      (modules '((guix build utils)))
+     ;; This patch is already accepted upstream but is required for version
+     ;; 0.2. The package will build without it, but it will fail to run any v
+     ;; tools afterwards because of how Guix changes modified timestamps in
+     ;; the package files.
+     (patches (search-patches
+               "vlang-accommodate-timestamps.patch"))
      (snippet
       '(begin
          ;; Eventually remove the whole thirdparty directory.
-- 
2.29.2
R
R
Ryan Prior wrote on 1 Jan 2021 20:27
[PATCH 5/6] gnu: vlang: Use system wyhash.
(address . 45601@debbugs.gnu.org)
20210101192713.23655-5-rprior@protonmail.com
* gnu/packages/vlang.scm (vlang) Use system wyhash.
---
gnu/packages/vlang.scm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index db7438d7f7..92d178a3e1 100644
--- a/gnu/packages/vlang.scm
+++ b/gnu/packages/vlang.scm
@@ -19,6 +19,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages vlang)
+  #:use-module (gnu packages datastructures)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages maths)
@@ -63,8 +64,10 @@
      (snippet
       '(begin
          ;; Eventually remove the whole thirdparty directory.
-         (delete-file-recursively "thirdparty/bignum")
-         (delete-file-recursively "thirdparty/cJSON")))))
+         (for-each delete-file-recursively
+                   '("thirdparty/bignum"
+                     "thirdparty/cJSON"
+                     "thirdparty/wyhash"))))))
    (build-system gnu-build-system)
    (arguments
     `(#:make-flags
@@ -89,7 +92,10 @@
                (string-append (assoc-ref inputs "tiny-bignum") "/share")))
             (substitute* "vlib/json/json_primitives.v"
               (("@VROOT/thirdparty/cJSON")
-               (assoc-ref inputs "cJSON")))))
+               (assoc-ref inputs "cJSON")))
+            (substitute* "vlib/hash/wyhash.c.v"
+              (("@VROOT/thirdparty/wyhash")
+               (string-append (assoc-ref inputs "wyhash") "/include")))))
         (add-before 'build 'patch-cc
           (lambda _
             (let* ((bin "tmp/bin")
@@ -150,7 +156,8 @@
    (inputs
     `(("glib" ,glib)
       ("tiny-bignum" ,tiny-bignum)
-      ("cJSON" ,(package-source cjson))))
+      ("cJSON" ,(package-source cjson))
+      ("wyhash" ,wyhash)))
    (native-inputs
     `(("vc"
        ;; Versions are not consistently tagged, but the matching commit will
-- 
2.29.2
L
L
Leo Famulari wrote on 1 Jan 2021 21:46
Re: [bug#45601] [PATCH 1/6] gnu: Add wyhash.
(address . 45601@debbugs.gnu.org)
X++KJvkcrmB7Zv8s@jasmine.lan
On Fri, Jan 01, 2021 at 07:27:19PM +0000, Ryan Prior via Guix-patches via wrote:
Toggle quote (2 lines)
> * gnu/packages/datastructures.scm (wyhash): New variable.

Thanks!

Can you move it to digest.scm and make it install the license file in
"$out/share/doc/wyhash-5"?

You can construct that path like this:

(let* ((out ...)
(doc (string-append out "/share/doc/" ,name "-" ,version))))

Toggle quote (3 lines)
> + (arguments
> + '(#:modules ((guix build utils))

The body of arguments will have to be quasiquoted for this to work. That
is, ` instead of '
R
R
Ryan Prior wrote on 1 Jan 2021 22:19
[PATCH] gnu: Add wyhash.
(address . 45601@debbugs.gnu.org)
20210101211926.29943-1-rprior@protonmail.com
* gnu/packages/datastructures.scm (wyhash): New variable.
---
gnu/packages/digest.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/digest.scm b/gnu/packages/digest.scm
index a33e238362..0b7977c2a5 100644
--- a/gnu/packages/digest.scm
+++ b/gnu/packages/digest.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Ryan Prior <rprior@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,9 +22,45 @@
   #:use-module (guix packages)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (guix utils)
   #:use-module (ice-9 match))
 
+(define-public wyhash
+  (package
+    (name "wyhash")
+    (version "5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/wangyi-fudan/wyhash")
+                    (commit (string-append "wyhash_v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "03ljs5iw9zrm3bydwggjvpwrcwmsd75h3dv1j4am4hw3h22cjdjc"))))
+    (build-system trivial-build-system) ;; source-only package
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let* ((out (string-append (assoc-ref %outputs "out")))
+                (src (string-append out "/include"))
+                (doc (string-append out "/share/doc/" ,name "-" ,version)))
+           (mkdir-p src)
+           (mkdir-p doc)
+           (chdir (assoc-ref %build-inputs "source"))
+           (install-file "wyhash.h" src)
+           (install-file "LICENSE" doc)
+           (install-file "README.md" doc))
+         #t)))
+    (home-page "https://github.com/wangyi-fudan/wyhash")
+    (synopsis "Embeddable hash function and random number generator.")
+    (description "This package provides a portable hash function and random
+number generator suitable for use in data structures.  Provided by default in
+Zig, V, and Nim programming language standard libraries.")
+    (license license:unlicense)))
+
 (define-public xxhash
   (package
     (name "xxhash")
-- 
2.29.2
R
R
Ryan Prior wrote on 3 Jan 2021 01:09
[PATCH] gnu: vlang: Update to 0.2.
(address . 45601@debbugs.gnu.org)
20210103000858.1778-1-rprior@protonmail.com
- 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 | 85 +++++++++++++++++++++++++++++++-----------
1 file changed, 63 insertions(+), 22 deletions(-)

Toggle diff (164 lines)
diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index e0b2e7bcfc..69c5598d0d 100644
--- a/gnu/packages/vlang.scm
+++ b/gnu/packages/vlang.scm
@@ -19,10 +19,15 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages vlang)
+  #:use-module (gnu packages digest)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages javascript)
+  #: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 +35,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.2")
    (source
     (origin
      (method git-fetch)
@@ -42,7 +58,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 +77,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") "vmodules/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 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"))
+                        "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 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))
@@ -107,7 +141,7 @@
     `(("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 "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 +155,20 @@
                   (commit vc-version)))
             (file-name (git-file-name "vc" vc-version))
             (sha256
-             (base32 "052gp5q2k31r3lci3rx4k0vy0vjdjva64xvrbbihn8lgmw63lc9f")))))
+             (base32 "1wlr9yzxz4bc7pbzbplzhjjr9sz5mwy2k2z5d3vwsnz56g245146")))))
+      ("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
R
R
Ryan Prior wrote on 4 Jan 2021 02:46
[PATCH 0/2] Another vlang dependency plucked out (re: bug#45601)
(address . 45601@debbugs.gnu.org)
20210104014620.19614-1-rprior@protonmail.com
Hey Guix! Here's a couple patches that extract yet another vendored dependnecy: picoev, a tiny portable networking event loop library. This furthers the work on vlang 0.2 in other patches of this series.

Ryan Prior (2):
gnu: Add picoev.
gnu: vlang: Use system picoenv.

gnu/packages/networking.scm | 51 +++++++++++++++++++++++++++++++++++++
gnu/packages/vlang.scm | 8 +++++-
2 files changed, 58 insertions(+), 1 deletion(-)

--
2.29.2
R
R
Ryan Prior wrote on 4 Jan 2021 02:46
[PATCH 1/2] gnu: Add picoev.
(address . 45601@debbugs.gnu.org)
20210104014620.19614-2-rprior@protonmail.com
* gnu/packages/networking.scm (picoev): New variable.
---
gnu/packages/networking.scm | 51 +++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 8c9db0c6b4..42eb7b3c59 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1828,6 +1828,57 @@ passphrase can be recovered and the AP's wireless settings can be
 reconfigured.")
     (license license:gpl2+)))
 
+(define-public picoev
+  (let ((commit "ff85d9ef578842a40f7c91d2544b7932cec74b9d")
+        (revision "0"))
+    (package
+      (name "picoev")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/kazuho/picoev")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "11ga0hyx6r229wvmds4gaq0ilrcb1j84gri7gxcnv7910yf1sv61"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; no tests available
+         #:make-flags (list (string-append "CC=" ,(cc-for-target))
+                            "LINUX_BUILD=1")
+         #:modules ((guix build gnu-build-system)
+                    (guix build utils)
+                    (srfi srfi-26))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (string-append (assoc-ref outputs "out")))
+                      (src (string-append out "/include"))
+                      (lib (string-append out "/lib"))
+                      (doc (string-append out "/share/doc/" ,name "-" ,version)))
+                 (mkdir-p src)
+                 (mkdir-p lib)
+                 (mkdir-p doc)
+                 (for-each (cut install-file <> src)
+                           '("picoev.h"
+                             "picoev_epoll.c"
+                             "picoev_kqueue.c"
+                             "picoev_select.c"))
+                 (install-file "libpicoev.so" lib)
+                 (install-file "README.md" doc))
+               #t)))))
+      (home-page "https://github.com/kazuho/picoev")
+      (synopsis "Tiny portable event loop library.")
+      (description
+       "This library provides a tiny event loop with a simple design,
+supporting only @code{select(2)}, @code{epoll(2)}, and @code{kqueue(2)}.")
+      (license license:expat))))
+
 (define-public perl-danga-socket
   (package
     (name "perl-danga-socket")
-- 
2.29.2
R
R
Ryan Prior wrote on 4 Jan 2021 02:46
[PATCH 2/2] gnu: vlang: Use system picoenv.
(address . 45601@debbugs.gnu.org)
20210104014620.19614-3-rprior@protonmail.com
* gnu/packages/vlang.scm (vlang): Use system picoenv.
---
gnu/packages/vlang.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/vlang.scm b/gnu/packages/vlang.scm
index dd970e643a..c3f439fce6 100644
--- a/gnu/packages/vlang.scm
+++ b/gnu/packages/vlang.scm
@@ -24,6 +24,7 @@
   #:use-module (gnu packages javascript)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages networking)
   #:use-module (gnu packages node)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
@@ -74,6 +75,7 @@
          (for-each delete-file-recursively
                    '("thirdparty/bignum"
                      "thirdparty/cJSON"
+                     "thirdparty/picoev"
                      "thirdparty/wyhash"))))))
    (build-system gnu-build-system)
    (arguments
@@ -102,7 +104,10 @@
                (assoc-ref inputs "cJSON")))
             (substitute* "vlib/hash/wyhash.c.v"
               (("@VROOT/thirdparty/wyhash")
-               (string-append (assoc-ref inputs "wyhash") "/include")))))
+               (string-append (assoc-ref inputs "wyhash") "/include")))
+            (substitute* "vlib/picoev/picoev.v"
+              (("@VROOT/thirdparty/picoev")
+               (string-append (assoc-ref inputs "picoev") "/include")))))
         (add-before 'build 'patch-cc
           (lambda _
             (let* ((bin "tmp/bin")
@@ -164,6 +169,7 @@
     `(("glib" ,glib)
       ("tiny-bignum" ,tiny-bignum)
       ("cJSON" ,(package-source cjson))
+      ("picoev" ,picoev)
       ("wyhash" ,wyhash)))
    (native-inputs
     `(("vc"
-- 
2.29.2
L
L
Leo Famulari wrote on 4 Jan 2021 03:07
Re: [bug#45601] [PATCH] gnu: Add wyhash.
(name . Ryan Prior via Guix-patches via)(address . guix-patches@gnu.org)(address . 45601@debbugs.gnu.org)
X/J4e6ZeWlTIystM@jasmine.lan
On Fri, Jan 01, 2021 at 09:19:29PM +0000, Ryan Prior via Guix-patches via wrote:
Toggle quote (2 lines)
> * gnu/packages/datastructures.scm (wyhash): New variable.

Thanks!

Pushed as 4a829b2d55bc9b0ad5a335c8228a7d2371fa1d9a with the following
changes...

I corrected the commit message (changing "datastructures.scm" to
"digest.scm"), tweaked the logic of the builder to be more idiomatic,
and removed the period at the end of the synopsis (`guix lint`
complained).

Toggle quote (14 lines)
> + #:builder
> + (begin
> + (use-modules (guix build utils))
> + (let* ((out (string-append (assoc-ref %outputs "out")))
> + (src (string-append out "/include"))
> + (doc (string-append out "/share/doc/" ,name "-" ,version)))
> + (mkdir-p src)
> + (mkdir-p doc)
> + (chdir (assoc-ref %build-inputs "source"))
> + (install-file "wyhash.h" src)
> + (install-file "LICENSE" doc)
> + (install-file "README.md" doc))
> + #t)))

Regarding the builder:

1) install-file does mkdir-p [0], so that can be omitted.
2) I think it's more clear to use "include" rather than "src" when
binding the output's include directory
3) Using with-directory-excursion instead of chdir is more in tune with
a functional coding style [1], in my opinion

[0]

[1]
R
R
Ryan Prior wrote on 4 Jan 2021 03:57
BDkXqmEbo4xMAVPNvmVOfa1ob-cldIbg3kxmkdJfI4T0EwTxJZcMDmpoy33y4rKdOr6WAtVNDo5n2pdY7fIgh2OA2tv0nmgGrvlnm0Apa9Q=@protonmail.com
Thank you! Agreed on all points.

I initially did call the variable `include' but Emacs scheme-mode highlighted it using a keyword face, which made me worry if I shouldn't choose something else in case include is some kind of reserved word.

I didn't know about `with-directory-excursion' before but it's clearly preferable. I got the idea to use `chdir' from looking at other packages (it's used many hundreds of places.)
Attachment: file
R
R
Ryan Prior wrote on 4 Jan 2021 04:07
[PATCH 1/1] gnu: Add picoev.
(address . 45601@debbugs.gnu.org)
20210104030743.25824-2-rprior@protonmail.com
* gnu/packages/networking.scm (picoev): New variable.
---
gnu/packages/networking.scm | 48 +++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index fad917a7c0..1057014571 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1827,6 +1827,54 @@ passphrase can be recovered and the AP's wireless settings can be
 reconfigured.")
     (license license:gpl2+)))
 
+(define-public picoev
+  (let ((commit "ff85d9ef578842a40f7c91d2544b7932cec74b9d")
+        (revision "0"))
+    (package
+      (name "picoev")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/kazuho/picoev")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "11ga0hyx6r229wvmds4gaq0ilrcb1j84gri7gxcnv7910yf1sv61"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; no tests available
+         #:make-flags (list (string-append "CC=" ,(cc-for-target))
+                            "LINUX_BUILD=1")
+         #:modules ((guix build gnu-build-system)
+                    (guix build utils)
+                    (srfi srfi-26))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (string-append (assoc-ref outputs "out")))
+                      (include (string-append out "/include"))
+                      (lib (string-append out "/lib"))
+                      (doc (string-append out "/share/doc/" ,name "-" ,version)))
+                 (for-each (cut install-file <> include)
+                           '("picoev.h"
+                             "picoev_epoll.c"
+                             "picoev_kqueue.c"
+                             "picoev_select.c"))
+                 (install-file "libpicoev.so" lib)
+                 (install-file "README.md" doc))
+               #t)))))
+      (home-page "https://github.com/kazuho/picoev")
+      (synopsis "Tiny portable event loop library")
+      (description
+       "This library provides a tiny event loop with a simple design,
+supporting only @code{select(2)}, @code{epoll(2)}, and @code{kqueue(2)}.")
+      (license license:expat))))
+
 (define-public perl-danga-socket
   (package
     (name "perl-danga-socket")
-- 
2.29.2
R
R
Ryan Prior wrote on 4 Jan 2021 04:07
[PATCH 0/1] Updated picoev patch based on feedback
(address . 45601@debbugs.gnu.org)
20210104030743.25824-1-rprior@protonmail.com
Based on Leo's feedback from the wyhash patch, I've updated the patch for picoev as well.

Ryan Prior (1):
gnu: Add picoev.

gnu/packages/networking.scm | 48 +++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

--
2.29.2
C
C
Christopher Baines wrote on 5 Feb 2021 14:30
Re: [bug#45601] [PATCH 1/1] gnu: Add picoev.
(name . Ryan Prior)(address . rprior@protonmail.com)(address . 45601@debbugs.gnu.org)
871rduzlo4.fsf@cbaines.net
Ryan Prior via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (2 lines)
> * gnu/packages/networking.scm (picoev): New variable.

Hey,

This look OK to me, although the license needs checking.

Would you be able to send the entire series of patches tracked under
#45601? I'm not quite sure what's current and superseded by looking
through the various emails.

Toggle quote (60 lines)
> ---
> gnu/packages/networking.scm | 48 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index fad917a7c0..1057014571 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -1827,6 +1827,54 @@ passphrase can be recovered and the AP's wireless settings can be
> reconfigured.")
> (license license:gpl2+)))
>
> +(define-public picoev
> + (let ((commit "ff85d9ef578842a40f7c91d2544b7932cec74b9d")
> + (revision "0"))
> + (package
> + (name "picoev")
> + (version (git-version "0.0.0" revision commit))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/kazuho/picoev")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "11ga0hyx6r229wvmds4gaq0ilrcb1j84gri7gxcnv7910yf1sv61"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; no tests available
> + #:make-flags (list (string-append "CC=" ,(cc-for-target))
> + "LINUX_BUILD=1")
> + #:modules ((guix build gnu-build-system)
> + (guix build utils)
> + (srfi srfi-26))
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure)
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (string-append (assoc-ref outputs "out")))
> + (include (string-append out "/include"))
> + (lib (string-append out "/lib"))
> + (doc (string-append out "/share/doc/" ,name "-" ,version)))
> + (for-each (cut install-file <> include)
> + '("picoev.h"
> + "picoev_epoll.c"
> + "picoev_kqueue.c"
> + "picoev_select.c"))
> + (install-file "libpicoev.so" lib)
> + (install-file "README.md" doc))
> + #t)))))
> + (home-page "https://github.com/kazuho/picoev")
> + (synopsis "Tiny portable event loop library")
> + (description
> + "This library provides a tiny event loop with a simple design,
> +supporting only @code{select(2)}, @code{epoll(2)}, and @code{kqueue(2)}.")
> + (license license:expat))))

Where did you get expat from? From looking at the files, that doesn't
seem to be the case.

Toggle quote (4 lines)
> +
> (define-public perl-danga-socket
> (package
> (name "perl-danga-socket")
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmAdSItfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xfsdw/+KLod8S+dxdMhUy/8wtPAbrMKwtWOCs8t
cR8KCRHFYfPKT5fLRpra+Vb7BpY0SmmJx2dl8oKcaXNBeQL8Xx5n3kMY4/6eZtic
4xwaAe07rzOv0DEI2txHD85m2GKM0CpRwwuK620XmO/TZquRuj8KnyiFFN9WYXFY
fFc19aDMXp34c1bwsxis/Epms9eQSaF/wI+upyGxlZkroGxmnPge3ga/26Dr0N7P
y/xs3uchp+drRmYHqPyCuad/J5ls22bSqo2mrrnuvulMcmzFYG4M/ofJVFPSjuEc
TgFXCrGjhX+iSCD+2gBTCyadhiIbpQdSKsoiD2l+plmOnVT0Ro28BBEnyOudfjvJ
a4/V/zo/ms2zXGYhDnV2rYlgPgRzJH9yYm7v+sNbP/aCTrsnK9oJNTNX5aMoenHU
PV8cKWeHowlKO/xQT2FLfd0Ldd3yYDqKG+EZn9UIwgIwUS8CVU2Iak+z550IZq9P
EkYjR8CgbqAmQJaBoAJWJ4QiYtbxO2w7O73BWrPyKatKcnTb0BNqsdjkbB/acbAa
YiY1DWtx8/Fd3F7uh0abLg7IwJlOdYohe1o+QwzUW22ZazPkvyErswyzECt6pW97
1Qn5/kA2QvNbi1nY1M/PFmp3b/qQ091vQJ96KzpSPtYmLycsRVDVfu/fVHwSHO+I
A8gE5Tgfwus=
=Zv62
-----END PGP SIGNATURE-----

?