This is an automated email from the git hooks/post-receive script.
sharlatan pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 4bd8806249 gnu: Add goawk.
4bd8806249 is described below
commit 4bd880624978dfd0c14c7f751b8b725c2d2e7d22
Author: Paul A. Patience <[email protected]>
AuthorDate: Sun Jul 10 01:58:41 2022 +0000
gnu: Add goawk.
* gnu/packages/gawk.scm (goawk): New variable.
Co-authored-by: Ashish SHUKLA <[email protected]>
Signed-off-by: Sharlatan Hellseher <[email protected]>
Change-Id: I4011e97962b23bab10c516c7d4d2b25f92330f9d
---
gnu/packages/textutils.scm | 58 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 57 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 7deea364d8..b7ed686371 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -25,11 +25,13 @@
;;; Copyright © 2021 Felix Gruber <[email protected]>
;;; Copyright © 2021 Bonface Munyoki Kilyungi <[email protected]>
;;; Copyright © 2022 Gabriel Wicki <[email protected]>
+;;; Copyright © 2022 Paul A. Patience <[email protected]>
;;; Copyright © 2023 Reza Housseini <[email protected]>
;;; Copyright © 2023 Hilton Chain <[email protected]>
;;; Copyright © 2023, 2024 Zheng Junjie <[email protected]>
-;;; Copyright © 2024 Timotej Lazar <[email protected]>;;
+;;; Copyright © 2024 Timotej Lazar <[email protected]>
;;; Copyright © 2024 Sharlatan Hellseher <[email protected]>
+;;; Copyright © 2024 Ashish SHUKLA <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1254,6 +1256,60 @@ OpenDocument presentations (*.odp).")
formats (e.g. Bibtex, RIS, ...) using a common XML intermediate.")
(license license:gpl2)))
+(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)
+ (arguments
+ (list
+ #:install-source? #f
+ #:import-path "github.com/benhoyt/goawk"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ ;; Disable tests trying to setup up locale and requiring gawk
+ ;; executable.
+ (substitute* (find-files "." "\\_test.go$")
+ (("TestShellCommand") "OffTestShellCommand")
+ (("TestInterp") "OffTestInterp")
+ (("TestCommandLine") "OffTestCommandLine")))))
+ (add-before 'check 'patch-paths
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (substitute* (list "interp/interp.go" "goawk_test.go")
+ (("/bin/sh") (which "sh")))
+ (substitute* "goawk_test.go"
+ ;; During tests goawk tries to write to existing files,
+ ;; point to an empty directory instead.
+ (("/testdata/output") "/testdata/output-tmp")))))
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion (string-append "src/" import-path)
+ (mkdir "testdata/output-tmp")
+ (invoke "go" "test" "./...")
+ ;; Make sure we have not left any generated articfacts
+ ;; during tests and moved them to the store.
+ (delete-file-recursively "testdata/output-tmp"))))))))
+ (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)))
+
(define-public opencc
(package
(name "opencc")