GNU bug report logs -
#56474
[PATCH] gnu: Add goawk.
Previous Next
Reported by: "Paul A. Patience" <paul <at> apatience.com>
Date: Sun, 10 Jul 2022 02:00:02 UTC
Severity: normal
Tags: moreinfo, patch
Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 10-07-2022 03:58, Paul A. Patience wrote:
> * 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")))
What Ludo wrote about not making the module graph more cyclic than it
already is with all that entails, and ...
> +(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")))))
... these two can be combined, substitute* accepts a list of files, it's
not restricted to a single file.
Also, this which seems incorrect when cross-compiling, do
(search-input-file inputs "bin/sh") instead and add 'bash-minimal' (or
'bash'?) to inputs, so you get the cross-compiled bash instead of the
native bash (for the goawk_test.go, it probably doesn't matter, but it's
important for interp.go).
Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
This bug report was last modified 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.