gnu: gawk: Use G-expressions and remove labels.

* gnu/packages/gawk.scm (gawk)[arguments]: Convert to G-expression.  Use
SEARCH-INPUT-FILE instead of label.
This commit is contained in:
Marius Bakke 2022-06-26 14:50:14 +02:00
parent 003128f2f3
commit da25a43f2d
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -25,6 +25,7 @@ (define-module (gnu packages gawk)
#:use-module (gnu packages bash)
#:use-module (gnu packages libsigsegv)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix build-system gnu))
@ -40,19 +41,19 @@ (define-public gawk
(base32 "18kybw47fb1sdagav7aj95r9pp09r5gm202y3ahvwjw9dqw2jxnq"))))
(build-system gnu-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(list #:phases
#~(modify-phases %standard-phases
(add-before 'configure 'set-shell-file-name
(lambda* (#:key inputs #:allow-other-keys)
;; Refer to the right shell.
(let ((bash (assoc-ref inputs "bash")))
(let ((/bin/sh (search-input-file inputs "bin/sh")))
(substitute* "io.c"
(("/bin/sh")
(string-append bash "/bin/sh")))
(("/bin/sh") /bin/sh))
;; When cross-compiling, remove dependencies on the
;; `check-for-shared-lib-support' target, which tries
;; to run the cross-built `gawk'.
,@(if (%current-target-system)
#$@(if (%current-target-system)
'((substitute* "extension/Makefile.in"
(("^.*: check-for-shared-lib-support" match)
(string-append "### " match))))