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