You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

74 lines
3.0 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  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. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  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
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages gawk)
  19. #:use-module (guix licenses)
  20. #:use-module (gnu packages bash)
  21. #:use-module (gnu packages libsigsegv)
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix build-system gnu))
  25. (define-public gawk
  26. (package
  27. (name "gawk")
  28. (version "4.1.0")
  29. (source (origin
  30. (method url-fetch)
  31. (uri (string-append "mirror://gnu/gawk/gawk-" version
  32. ".tar.xz"))
  33. (sha256
  34. (base32 "0hin2hswbbd6kd6i4zzvgciwpl5fba8d2s524z8y5qagyz3x010q"))))
  35. (build-system gnu-build-system)
  36. (arguments
  37. `(#:parallel-tests? #f ; test suite fails in parallel
  38. #:phases (alist-cons-before
  39. 'configure 'set-shell-file-name
  40. (lambda* (#:key inputs #:allow-other-keys)
  41. ;; Refer to the right shell.
  42. (let ((bash (assoc-ref inputs "bash")))
  43. (substitute* "io.c"
  44. (("/bin/sh")
  45. (string-append bash "/bin/bash")))
  46. ;; When cross-compiling, remove dependencies on the
  47. ;; `check-for-shared-lib-support' target, which tries to
  48. ;; run the cross-built `gawk'.
  49. ,@(if (%current-target-system)
  50. '((substitute* "extension/Makefile.in"
  51. (("^.*: check-for-shared-lib-support" match)
  52. (string-append "### " match))))
  53. '())))
  54. %standard-phases)))
  55. (inputs `(("libsigsegv" ,libsigsegv)
  56. ,@(if (%current-target-system)
  57. `(("bash" ,bash))
  58. '())))
  59. (home-page "http://www.gnu.org/software/gawk/")
  60. (synopsis "A text scanning and processing language")
  61. (description
  62. "Gawk is an implementation of Awk, a specialised programming language
  63. for the easy manipulation of formatted text, such as tables of data. The GNU
  64. implementation of Awk features a number of extensions beyond the traditional
  65. implementations, making writing powerful text manipulation scripts a simple
  66. task compared to writing similar programs in C.")
  67. (license gpl3+)))