Commit | Line | Data |
---|---|---|
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 | |
97c15a29 LC |
34 | (method url-fetch) |
35 | ;; Old tarballs are moved to old/. | |
36 | (uri (list (string-append "ftp://ftp.astron.com/pub/tcsh/" | |
37 | "tcsh-" version ".tar.gz") | |
38 | (string-append "ftp://ftp.astron.com/pub/tcsh/" | |
39 | "old/tcsh-" version ".tar.gz"))) | |
40 | (sha256 | |
41 | (base32 | |
42 | "1a4z9kwgx1iqqzvv64si34m60gj34p7lp6rrcrb59s7ka5wa476q")) | |
fc1adab1 | 43 | (patches (search-patches "tcsh-fix-autotest.patch")) |
97c15a29 | 44 | (patch-flags '("-p0")))) |
16fd1db5 CR |
45 | (build-system gnu-build-system) |
46 | (inputs | |
47 | `(("autoconf" ,autoconf) | |
48 | ("coreutils" ,coreutils) | |
01eafd38 | 49 | ("ncurses" ,ncurses))) |
16fd1db5 CR |
50 | (arguments |
51 | `(#:phases | |
d4bf49b1 EB |
52 | (alist-cons-before |
53 | 'check 'patch-test-scripts | |
54 | (lambda _ | |
55 | ;; Take care of pwd | |
56 | (substitute* '("tests/commands.at" "tests/variables.at") | |
57 | (("/bin/pwd") (which "pwd"))) | |
58 | ;; The .at files create shell scripts without shebangs. Erk. | |
59 | (substitute* "tests/commands.at" | |
60 | (("./output.sh") "/bin/sh output.sh")) | |
61 | (substitute* "tests/syntax.at" | |
62 | (("; other_script.csh") "; /bin/sh other_script.csh")) | |
63 | ;; Now, let's generate the test suite and patch it | |
64 | (system* "make" "tests/testsuite") | |
e343024d LC |
65 | |
66 | ;; This file is ISO-8859-1 encoded. | |
67 | (with-fluids ((%default-port-encoding #f)) | |
68 | (substitute* "tests/testsuite" | |
69 | (("/bin/sh") (which "sh"))))) | |
16fd1db5 CR |
70 | (alist-cons-after |
71 | 'install 'post-install | |
72 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
73 | (let* ((out (assoc-ref %outputs "out")) | |
74 | (bin (string-append out "/bin"))) | |
75 | (with-directory-excursion bin | |
76 | (symlink "tcsh" "csh")))) | |
01eafd38 | 77 | %standard-phases)))) |
16fd1db5 | 78 | (home-page "http://www.tcsh.org/") |
9e771e3b | 79 | (synopsis "Unix shell based on csh") |
16fd1db5 CR |
80 | (description |
81 | "Tcsh is an enhanced, but completely compatible version of the Berkeley | |
35b9e423 EB |
82 | UNIX C shell (csh). It is a command language interpreter usable both as an |
83 | interactive login shell and a shell script command processor. It includes a | |
16fd1db5 CR |
84 | command-line editor, programmable word completion, spelling correction, a |
85 | history mechanism, job control and a C-like syntax.") | |
86 | (license bsd-4))) |