gnu: gettext: Upgrade to 0.18.3.
[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
38 (base32 "1a4z9kwgx1iqqzvv64si34m60gj34p7lp6rrcrb59s7ka5wa476q"))))
39 (build-system gnu-build-system)
40 (inputs
41 `(("autoconf" ,autoconf)
42 ("coreutils" ,coreutils)
43 ("ncurses" ,ncurses)
44 ("patch/skip-tests"
45 ,(search-patch "tcsh-fix-autotest.patch"))))
46 (arguments
47 `(#:phases
48 (alist-replace
49 'check
50 (lambda* (#:key inputs #:allow-other-keys #:rest args)
51 (let ((check (assoc-ref %standard-phases 'check)))
52 ;; Take care of pwd
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
61 ;; tests.
62 (system* "make" "tests/testsuite")
63 (substitute* "tests/testsuite" (("/bin/sh") (which "sh")))
64 (apply check args)))
65 (alist-cons-after
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"))))
72 %standard-phases))
73 #:patches (list (assoc-ref %build-inputs "patch/skip-tests"))
74 #:patch-flags '("-p0")))
75 (home-page "http://www.tcsh.org/")
76 (synopsis "A Unix shell based on csh")
77 (description
78 "Tcsh is an enhanced, but completely compatible version of the Berkeley
79UNIX C shell (csh). It is a command language interpreter usable both as an
80interactive login shell and a shell script command processor. It includes a
81command-line editor, programmable word completion, spelling correction, a
82history mechanism, job control and a C-like syntax.")
83 (license bsd-4)))