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