guix-build: Fix typo.
[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)
1ffa7090 21 #:use-module (gnu packages libsigsegv)
c44899a2 22 #:use-module (guix packages)
87f5d366 23 #:use-module (guix download)
c44899a2
LC
24 #:use-module (guix utils)
25 #:use-module (guix build-system gnu))
26
27(define-public gawk
28 (package
29 (name "gawk")
30 (version "4.0.0")
31 (source (origin
87f5d366 32 (method url-fetch)
0db342a5 33 (uri (string-append "mirror://gnu/gawk/gawk-" version
c44899a2
LC
34 ".tar.bz2"))
35 (sha256
36 (base32 "0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0"))))
37 (build-system gnu-build-system)
c2031363
LC
38 (arguments
39 (case-lambda
40 ((system)
41 `(#:parallel-tests? #f ; test suite fails in parallel
42
43 ;; Work around test failure on Cygwin.
44 #:tests? ,(not (string=? system "i686-cygwin"))
45
46 #:phases (alist-cons-before
47 'configure 'set-shell-file-name
48 (lambda* (#:key inputs #:allow-other-keys)
49 ;; Refer to the right shell.
50 (let ((bash (assoc-ref inputs "bash")))
51 (substitute* "io.c"
52 (("/bin/sh")
53 (string-append bash "/bin/bash")))))
54 %standard-phases)))
55 ((system cross-system)
56 '(#:parallel-tests? #f))))
ab6522ae 57 (inputs `(("libsigsegv" ,libsigsegv)))
c44899a2
LC
58 (home-page "http://www.gnu.org/software/gawk/")
59 (synopsis "GNU implementation of the Awk programming language")
60 (description
61 "Many computer users need to manipulate text files: extract and then
62operate on data from parts of certain lines while discarding the rest, make
63changes in various text files wherever certain patterns appear, and so on.
64To write a program to do these things in a language such as C or Pascal is a
65time-consuming inconvenience that may take many lines of code. The job is
66easy with awk, especially the GNU implementation: Gawk.
67
68The awk utility interprets a special-purpose programming language that makes
69it possible to handle many data-reformatting jobs with just a few lines of
70code.")
4a44e743 71 (license gpl3+)))