all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Paul A. Patience" <paul@apatience.com>
To: 56474@debbugs.gnu.org
Cc: "Paul A. Patience" <paul@apatience.com>
Subject: [bug#56474] [PATCH] gnu: Add goawk.
Date: Sun, 10 Jul 2022 01:58:41 +0000	[thread overview]
Message-ID: <20220710015832.129472-1-paul@apatience.com> (raw)

* gnu/packages/gawk.scm (goawk): New variable.
---
 gnu/packages/gawk.scm | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 9feaf059fb..9bc96d87e7 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -33,7 +33,8 @@ (define-module (gnu packages gawk)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system copy)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go))

 (define-public gawk
   (package
@@ -245,3 +246,41 @@ (define-public cppawk-egawk
        (delete "gawk-mpfr")
        (prepend egawk-next)))
     (synopsis "cppawk that calls Enhanced GNU Awk by default")))
+
+(define-public goawk
+  (package
+    (name "goawk")
+    (version "1.19.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/benhoyt/goawk")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "12z7nzrqyx0y18bsc95i1vp251jw3ik2xj5g8bc12vybndw5x0j0"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/benhoyt/goawk"
+       #:install-source? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-paths
+           (lambda _
+             (substitute* "src/github.com/benhoyt/goawk/interp/interp.go"
+               (("/bin/sh") (which "sh")))
+             (substitute* "src/github.com/benhoyt/goawk/goawk_test.go"
+               (("/bin/sh") (which "sh")))))
+         (add-after 'fix-paths 'fix-tests
+           (lambda _
+             (substitute* "src/github.com/benhoyt/goawk/goawk_test.go"
+               ;; Don't write test output; it is compared with expected
+               ;; results anyway.
+               (("\"writegoawk\", true") "\"writegoawk\", false")))))))
+    (home-page "https://github.com/benhoyt/goawk")
+    (synopsis "Awk interpreter with CSV support")
+    (description
+     "GoAWK is a POSIX-compatible version of Awk that also has a CSV mode for
+reading and writing CSV and TSV files.")
+    (license license:expat)))
--
2.36.1






             reply	other threads:[~2022-07-10  2:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-10  1:58 Paul A. Patience [this message]
2022-07-11 12:17 ` [bug#56474] [PATCH] gnu: Add goawk Paul A. Patience
2022-07-19 21:03   ` Ludovic Courtès
2022-07-20 13:34 ` Maxime Devos

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=20220710015832.129472-1-paul@apatience.com \
    --to=paul@apatience.com \
    --cc=56474@debbugs.gnu.org \
    /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.