[PATCH] gnu: Add goawk.

  • Done
  • quality assurance status badge
Details
2 participants
  • ashish.is
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
ashish.is
Severity
normal
A
A
ashish.is wrote on 12 Aug 20:38 +0200
(address . guix-patches@gnu.org)(name . Ashish SHUKLA)(address . ashish.is@lostca.se)
8a996a8f08f6127e8d3aa9e2a24dffb4a69ea94b.1723487880.git.ashish.is@lostca.se
From: Ashish SHUKLA <ashish.is@lostca.se>

* gnu/packages/gawk.scm (goawk): New variable.

Change-Id: Ib611f1ea55b6a4e115f82e08054ea8d04ec57329
---
gnu/packages/gawk.scm | 47 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 46 insertions(+), 1 deletion(-)

Toggle diff (73 lines)
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 16a4ca5b0a..f407da9d94 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2018, 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,7 +35,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
@@ -236,3 +238,46 @@ (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.27.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 "003idgqj1g41y4sja9gzbds95fl3ba0l20wfgh7hp4kiivgls7r8"))))
+ (build-system go-build-system)
+ (native-inputs (list gawk bash-minimal))
+ (arguments
+ (list
+ #:import-path "github.com/benhoyt/goawk"
+ #:phases
+ '(modify-phases %standard-phases
+ (add-after 'unpack 'patch-bin-sh
+ (lambda* (#:key inputs import-path #:allow-other-keys)
+ (for-each (lambda (f)
+ (substitute* (string-append "src/" import-path "/" f)
+ (("/bin/sh")
+ (string-append (assoc-ref inputs "bash-minimal") "/bin/sh"))
+ (("TestCommandLine") ;; failing test case
+ "SkipCommandLine")))
+ (list "goawk_test.go" "interp/interp.go"))))
+ (replace 'check
+ (lambda* (#:key inputs import-path #:allow-other-keys)
+ (let ((test-output (string-append "src/" import-path "/testdata/output")))
+ (chmod test-output #o755)
+ (for-each (lambda (f)
+ (chmod f #o644))
+ (find-files test-output))
+ (invoke "go" "test" import-path
+ "-awk" (string-append (assoc-ref inputs "gawk") "/bin/gawk"))))))))
+ (home-page "https://github.com/benhoyt/goawk")
+ (synopsis "GoAWK: an AWK interpreter with CSV support")
+ (description "Package goawk is an implementation of AWK with CSV support.")
+ (license license:expat)))

base-commit: 2b7e2f44169c3da710534a614b4a0a313a7d272a
--
2.46.0
S
S
Sharlatan Hellseher wrote on 14 Aug 10:46 +0200
(address . 72595-done@debbugs.gnu.org)
87ttfnze40.fsf@gmail.com
Hi,

Pushed as 4bd880624978dfd0c14c7f751b8b725c2d2e7d22 to master.

It's compbined work from https://issues.guix.gnu.org/56474.

---
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAma8bs8ACgkQdtcnv/Ys
0rUVfg//d8XNatxa8G/21OGYUkOOJnw3Emwn2yca/2Q59jU0ua2uDYPEy1AYMS/q
Lva52ARm1ZEXSlm7AHYd7gJUkwXP0q1ehvy/cZO4sHNT7CltWo/dzI3wNRjetk6F
LCd6P31RhDAxwDpbCU36DG2jPf1Rnwp2i38HUw3i289hm/dAG0RmOsR/ek/kldvp
4GbuH3s2K1daBFG5GonJufK72ZLediEHg5H5dSK0WcAErKCC4F8m4ebf4T7t72q7
wkR+qRhZgh1iDBOVg+tET4apP+OnpzxFIUqjXK6UuqDdc/dkIE6GkzcTYnGSk7EK
Y6o3niTmaJTEtyzM+Hqc262RGN90JzxE8SLcd/PGg5WHrwZp2FHIv+iP5kJgrthf
ACJyUc9DZSnkw5D8Khh9MgkjYNNpFruo0pdxi9DYAINI6oAkpoNQw7hATJOY73i8
IZgFg3NQu7PZ6fPF0lhvxOgWAJd+SGc158lL8FB+Q9GPDF/r2vxHweSPCNwRQ5Ti
BqHVxNzYdiqLKBR1+SQsw4ZilSF98ycfq6GLbJkEwDIM8VJHSto3X72AvSfepve5
5zkKPX05Of9RavIWK3Jpn1+qrM5tkyySLIANGbfSl3Ao27A1/eR4wzvj3NyENHK+
pVRpPXyqxLedvTWxkQcnC2Nl3Xnb9LNZl4SRmaDMny/c2v0arjE=
=j1HL
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72595@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72595
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch