Synchronize package descriptions with the Womb.
[jackhill/guix/guix.git] / gnu / packages / gawk.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
ab6522ae 2;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
c44899a2 3;;;
233e7676 4;;; This file is part of GNU Guix.
c44899a2 5;;;
233e7676 6;;; GNU Guix is free software; you can redistribute it and/or modify it
c44899a2
LC
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
233e7676 11;;; GNU Guix is distributed in the hope that it will be useful, but
c44899a2
LC
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
233e7676 17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
c44899a2 18
1ffa7090 19(define-module (gnu packages gawk)
4a44e743 20 #:use-module (guix licenses)
63c0c19a 21 #:use-module (gnu packages bash)
1ffa7090 22 #:use-module (gnu packages libsigsegv)
c44899a2 23 #:use-module (guix packages)
87f5d366 24 #:use-module (guix download)
c44899a2
LC
25 #:use-module (guix build-system gnu))
26
27(define-public gawk
28 (package
29 (name "gawk")
d16368cf 30 (version "4.1.0")
c44899a2 31 (source (origin
87f5d366 32 (method url-fetch)
0db342a5 33 (uri (string-append "mirror://gnu/gawk/gawk-" version
cecb712c 34 ".tar.xz"))
c44899a2 35 (sha256
d16368cf 36 (base32 "0hin2hswbbd6kd6i4zzvgciwpl5fba8d2s524z8y5qagyz3x010q"))))
c44899a2 37 (build-system gnu-build-system)
c2031363 38 (arguments
21c203a5 39 `(#:parallel-tests? #f ; test suite fails in parallel
c2031363 40
21c203a5
LC
41 #:phases (alist-cons-before
42 'configure 'set-shell-file-name
43 (lambda* (#:key inputs #:allow-other-keys)
44 ;; Refer to the right shell.
63c0c19a
LC
45 (let ((bash (assoc-ref inputs "bash")))
46 (substitute* "io.c"
47 (("/bin/sh")
1e4310f1
LC
48 (string-append bash "/bin/bash")))
49
50 ;; When cross-compiling, remove dependencies on the
51 ;; `check-for-shared-lib-support' target, which tries to
52 ;; run the cross-built `gawk'.
53 ,@(if (%current-target-system)
54 '((substitute* "extension/Makefile.in"
55 (("^.*: check-for-shared-lib-support" match)
56 (string-append "### " match))))
57 '())))
56c092ce 58 %standard-phases)))
63c0c19a
LC
59 (inputs `(("libsigsegv" ,libsigsegv)
60
63c0c19a
LC
61 ,@(if (%current-target-system)
62 `(("bash" ,bash))
63 '())))
64
c44899a2 65 (home-page "http://www.gnu.org/software/gawk/")
f50d2669 66 (synopsis "A text scanning and processing language")
c44899a2 67 (description
a22dc0c4
LC
68 "Gawk is an implementation of Awk, a specialised programming language
69for the easy manipulation of formatted text, such as tables of data. The GNU
70implementation of Awk features a number of extensions beyond the traditional
71implementations, making writing powerful text manipulation scripts a simple
72task compared to writing similar programs in C.")
4a44e743 73 (license gpl3+)))