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.
 
 
 
 
 
 

82 lines
3.3 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
  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 tcsh)
  19. #:use-module (guix licenses)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system gnu)
  23. #:use-module (gnu packages)
  24. #:use-module (gnu packages autotools)
  25. #:use-module (gnu packages base)
  26. #:use-module (gnu packages ncurses))
  27. (define-public tcsh
  28. (package
  29. (name "tcsh")
  30. (version "6.18.01")
  31. (source (origin
  32. (method url-fetch)
  33. (uri (string-append "ftp://ftp.astron.com/pub/tcsh/tcsh-"
  34. version ".tar.gz"))
  35. (sha256
  36. (base32 "1a4z9kwgx1iqqzvv64si34m60gj34p7lp6rrcrb59s7ka5wa476q"))
  37. (patches (list (search-patch "tcsh-fix-autotest.patch")))
  38. (patch-flags '("-p0"))))
  39. (build-system gnu-build-system)
  40. (inputs
  41. `(("autoconf" ,autoconf)
  42. ("coreutils" ,coreutils)
  43. ("ncurses" ,ncurses)))
  44. (arguments
  45. `(#:phases
  46. (alist-replace
  47. 'check
  48. (lambda* (#:key inputs #:allow-other-keys #:rest args)
  49. (let ((check (assoc-ref %standard-phases 'check)))
  50. ;; Take care of pwd
  51. (substitute* '("tests/commands.at" "tests/variables.at")
  52. (("/bin/pwd") (which "pwd")))
  53. ;; The .at files create shell scripts without shebangs. Erk.
  54. (substitute* "tests/commands.at"
  55. (("./output.sh") "/bin/sh output.sh"))
  56. (substitute* "tests/syntax.at"
  57. (("; other_script.csh") "; /bin/sh other_script.csh"))
  58. ;; Now, let's generate the test suite, patch it and finally run the
  59. ;; tests.
  60. (system* "make" "tests/testsuite")
  61. (substitute* "tests/testsuite" (("/bin/sh") (which "sh")))
  62. (apply check args)))
  63. (alist-cons-after
  64. 'install 'post-install
  65. (lambda* (#:key inputs outputs #:allow-other-keys)
  66. (let* ((out (assoc-ref %outputs "out"))
  67. (bin (string-append out "/bin")))
  68. (with-directory-excursion bin
  69. (symlink "tcsh" "csh"))))
  70. %standard-phases))))
  71. (home-page "http://www.tcsh.org/")
  72. (synopsis "A Unix shell based on csh")
  73. (description
  74. "Tcsh is an enhanced, but completely compatible version of the Berkeley
  75. UNIX C shell (csh). It is a command language interpreter usable both as an
  76. interactive login shell and a shell script command processor. It includes a
  77. command-line editor, programmable word completion, spelling correction, a
  78. history mechanism, job control and a C-like syntax.")
  79. (license bsd-4)))