* [bug#72595] [PATCH] gnu: Add goawk.
@ 2024-08-12 18:38 ashish.is--- via Guix-patches via
2024-08-14 8:46 ` bug#72595: " Sharlatan Hellseher
0 siblings, 1 reply; 2+ messages in thread
From: ashish.is--- via Guix-patches via @ 2024-08-12 18:38 UTC (permalink / raw)
To: 72595; +Cc: Ashish SHUKLA
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#72595: [PATCH] gnu: Add goawk.
2024-08-12 18:38 [bug#72595] [PATCH] gnu: Add goawk ashish.is--- via Guix-patches via
@ 2024-08-14 8:46 ` Sharlatan Hellseher
0 siblings, 0 replies; 2+ messages in thread
From: Sharlatan Hellseher @ 2024-08-14 8:46 UTC (permalink / raw)
To: 72595-done
[-- Attachment #1: Type: text/plain, Size: 141 bytes --]
Hi,
Pushed as 4bd880624978dfd0c14c7f751b8b725c2d2e7d22 to master.
It's compbined work from <https://issues.guix.gnu.org/56474>.
---
Oleg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-14 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 18:38 [bug#72595] [PATCH] gnu: Add goawk ashish.is--- via Guix-patches via
2024-08-14 8:46 ` bug#72595: " Sharlatan Hellseher
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.