gnu: docbook-xsl update to 1.78.1
[jackhill/guix/guix.git] / gnu / packages / tcsh.scm
CommitLineData
16fd1db5
CR
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
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))
28
29(define-public tcsh
30 (package
31 (name "tcsh")
32 (version "6.18.01")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "ftp://ftp.astron.com/pub/tcsh/tcsh-"
36 version ".tar.gz"))
37 (sha256
01eafd38
LC
38 (base32 "1a4z9kwgx1iqqzvv64si34m60gj34p7lp6rrcrb59s7ka5wa476q"))
39 (patches (list (search-patch "tcsh-fix-autotest.patch")))
40 (patch-flags '("-p0"))))
16fd1db5
CR
41 (build-system gnu-build-system)
42 (inputs
43 `(("autoconf" ,autoconf)
44 ("coreutils" ,coreutils)
01eafd38 45 ("ncurses" ,ncurses)))
16fd1db5
CR
46 (arguments
47 `(#:phases
d4bf49b1
EB
48 (alist-cons-before
49 'check 'patch-test-scripts
50 (lambda _
51 ;; Take care of pwd
52 (substitute* '("tests/commands.at" "tests/variables.at")
53 (("/bin/pwd") (which "pwd")))
54 ;; The .at files create shell scripts without shebangs. Erk.
55 (substitute* "tests/commands.at"
56 (("./output.sh") "/bin/sh output.sh"))
57 (substitute* "tests/syntax.at"
58 (("; other_script.csh") "; /bin/sh other_script.csh"))
59 ;; Now, let's generate the test suite and patch it
60 (system* "make" "tests/testsuite")
61 (substitute* "tests/testsuite" (("/bin/sh") (which "sh"))))
16fd1db5
CR
62 (alist-cons-after
63 'install 'post-install
64 (lambda* (#:key inputs outputs #:allow-other-keys)
65 (let* ((out (assoc-ref %outputs "out"))
66 (bin (string-append out "/bin")))
67 (with-directory-excursion bin
68 (symlink "tcsh" "csh"))))
01eafd38 69 %standard-phases))))
16fd1db5
CR
70 (home-page "http://www.tcsh.org/")
71 (synopsis "A Unix shell based on csh")
72 (description
73 "Tcsh is an enhanced, but completely compatible version of the Berkeley
74UNIX C shell (csh). It is a command language interpreter usable both as an
75interactive login shell and a shell script command processor. It includes a
76command-line editor, programmable word completion, spelling correction, a
77history mechanism, job control and a C-like syntax.")
78 (license bsd-4)))