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