gnu: cups-filters: Use ghostscript with CUPS driver.
[jackhill/guix/guix.git] / gnu / packages / shells.scm
CommitLineData
c356339d 1;;; GNU Guix --- Functional package management for GNU
d754347c 2;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
618977ae 3;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
7ccb874a 4;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
9a57d3e6 5;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
c356339d
TGR
6;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages shells)
d754347c 24 #:use-module (gnu packages)
a8d3bc47 25 #:use-module (gnu packages algebra)
9a57d3e6 26 #:use-module (gnu packages autotools)
d754347c 27 #:use-module (gnu packages base)
618977ae 28 #:use-module (gnu packages documentation)
c356339d 29 #:use-module (gnu packages libedit)
618977ae 30 #:use-module (gnu packages ncurses)
7ccb874a 31 #:use-module (gnu packages pcre)
9a57d3e6
TGR
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages pkg-config)
618977ae 34 #:use-module (gnu packages python)
9a57d3e6 35 #:use-module (gnu packages readline)
c356339d 36 #:use-module (guix build-system gnu)
1d515855 37 #:use-module (guix build-system python)
c356339d 38 #:use-module (guix download)
9a57d3e6 39 #:use-module (guix git-download)
c356339d
TGR
40 #:use-module (guix licenses)
41 #:use-module (guix packages))
42
43(define-public dash
44 (package
45 (name "dash")
46 (version "0.5.9")
47 (source
48 (origin
49 (method url-fetch)
50 (uri (string-append "http://gondor.apana.org.au/~herbert/dash/files/"
51 name "-" version ".tar.gz"))
52 (sha256
53 (base32
54 "17328wd9n5krr5wd37smrk0y7fdf8aa3hmhm02br5mqpq0a3nycj"))
55 (modules '((guix build utils)))
56 (snippet
57 '(begin
58 ;; The man page hails from BSD, where (d)ash is the default shell.
59 ;; This isn't the case on Guix or indeed most other GNU systems.
60 (substitute* "src/dash.1"
61 (("the standard command interpreter for the system")
62 "a command interpreter based on the original Bourne shell"))
63 #t))))
64 (build-system gnu-build-system)
65 (inputs
66 `(("libedit" ,libedit)))
67 (arguments
68 `(#:configure-flags '("--with-libedit")))
69 (home-page "http://gondor.apana.org.au/~herbert/dash")
70 (synopsis "POSIX-compliant shell optimised for size")
71 (description
72 "dash is a POSIX-compliant @command{/bin/sh} implementation that aims to be
73as small as possible, often without sacrificing speed. It is faster than the
74GNU Bourne-Again Shell (@command{bash}) at most scripted tasks. dash is a
75direct descendant of NetBSD's Almquist Shell (@command{ash}).")
76 (license (list bsd-3
77 gpl2+)))) ; mksignames.c
618977ae
TGR
78
79(define-public fish
80 (package
81 (name "fish")
82 (version "2.3.1")
83 (source (origin
84 (method url-fetch)
85 (uri (string-append "https://fishshell.com/files/"
86 version "/fish-" version ".tar.gz"))
87 (sha256
88 (base32
89 "0r46p64lg6da3v6chsa4gisvl04kd3rpy60yih8r870kbp9wm2ij"))
90 (modules '((guix build utils)))
91 ;; Don't try to install /etc/fish/config.fish.
92 (snippet
93 '(substitute* "Makefile.in"
94 ((".*INSTALL.*sysconfdir.*fish.*") "")))))
95 (build-system gnu-build-system)
96 (native-inputs
97 `(("doxygen" ,doxygen)))
98 (inputs
a8d3bc47
AI
99 `(("bc" ,bc)
100 ("ncurses" ,ncurses)
47c14714 101 ("pcre2" ,pcre2) ;don't use the bundled PCRE2
618977ae
TGR
102 ("python" ,python-wrapper))) ;for fish_config and manpage completions
103 (arguments
104 '(#:tests? #f ; no check target
a8d3bc47
AI
105 #:configure-flags '("--sysconfdir=/etc")
106 #:phases
107 (modify-phases %standard-phases
108 ;; Replace 'bc' by its absolute file name in the store.
109 (add-after 'unpack 'patch-bc
110 (lambda* (#:key inputs outputs #:allow-other-keys)
111 (substitute* '("share/functions/math.fish"
112 "share/functions/seq.fish")
113 (("\\| bc")
114 (string-append "| " (assoc-ref %build-inputs "bc")
115 "/bin/bc"))))))))
618977ae
TGR
116 (synopsis "The friendly interactive shell")
117 (description
118 "Fish (friendly interactive shell) is a shell focused on interactive use,
119discoverability, and friendliness. Fish has very user-friendly and powerful
120tab-completion, including descriptions of every completion, completion of
121strings with wildcards, and many completions for specific commands. It also
122has extensive and discoverable help. A special help command gives access to
123all the fish documentation in your web browser. Other features include smart
124terminal handling based on terminfo, an easy to search history, and syntax
125highlighting.")
126 (home-page "https://fishshell.com/")
127 (license gpl2)))
9a57d3e6
TGR
128
129(define-public rc
130 (package
131 (name "rc")
132 (version "1.7.4")
133 (source (origin
134 (method git-fetch)
135 (uri (git-reference
136 (url "git://github.com/rakitzis/rc.git")
137 ;; commit name 'release: rc-1.7.4'
138 (commit "c884da53a7c885d46ace2b92de78946855b18e92")))
139 (sha256
140 (base32
141 "00mgzvrrh9w96xa85g4gjbsvq02f08k4jwjcdnxq7kyh5xgiw95l"))
142 (file-name (string-append name "-" version "-checkout"))))
143 (build-system gnu-build-system)
144 (arguments
145 `(#:configure-flags
146 '("--with-edit=gnu")
147 #:phases
148 (modify-phases %standard-phases
149 (add-after
150 'unpack 'autoreconf
151 (lambda _ (zero? (system* "autoreconf" "-vfi"))))
152 (add-before
153 'autoreconf 'patch-trip.rc
154 (lambda _
155 (substitute* "trip.rc"
156 (("/bin/pwd") (which "pwd"))
157 (("/bin/sh") (which "sh"))
158 (("/bin/rm") (which "rm"))
159 (("/bin\\)") (string-append (dirname (which "rm")) ")")))
160 #t)))))
161 (inputs `(("readline" ,readline)
162 ("perl" ,perl)))
163 (native-inputs `(("autoconf" ,autoconf)
164 ("automake" ,automake)
165 ("libtool" ,libtool)
166 ("pkg-config" ,pkg-config)))
167 (synopsis "Alternative implementation of the rc shell by Byron Rakitzis")
168 (description
169 "This is a reimplementation by Byron Rakitzis of the Plan 9 shell. It
170has a small feature set similar to a traditional Bourne shell.")
171 (home-page "http://github.com/rakitzis/rc")
172 (license zlib)))
d754347c
TGR
173
174(define-public tcsh
175 (package
176 (name "tcsh")
177 (version "6.18.01")
178 (source (origin
179 (method url-fetch)
180 ;; Old tarballs are moved to old/.
181 (uri (list (string-append "ftp://ftp.astron.com/pub/tcsh/"
182 "tcsh-" version ".tar.gz")
183 (string-append "ftp://ftp.astron.com/pub/tcsh/"
184 "old/tcsh-" version ".tar.gz")))
185 (sha256
186 (base32
187 "1a4z9kwgx1iqqzvv64si34m60gj34p7lp6rrcrb59s7ka5wa476q"))
188 (patches (search-patches "tcsh-fix-autotest.patch"))
189 (patch-flags '("-p0"))))
190 (build-system gnu-build-system)
191 (inputs
192 `(("autoconf" ,autoconf)
193 ("coreutils" ,coreutils)
194 ("ncurses" ,ncurses)))
195 (arguments
196 `(#:phases
197 (alist-cons-before
198 'check 'patch-test-scripts
199 (lambda _
200 ;; Take care of pwd
201 (substitute* '("tests/commands.at" "tests/variables.at")
202 (("/bin/pwd") (which "pwd")))
203 ;; The .at files create shell scripts without shebangs. Erk.
204 (substitute* "tests/commands.at"
205 (("./output.sh") "/bin/sh output.sh"))
206 (substitute* "tests/syntax.at"
207 (("; other_script.csh") "; /bin/sh other_script.csh"))
208 ;; Now, let's generate the test suite and patch it
209 (system* "make" "tests/testsuite")
210
211 ;; This file is ISO-8859-1 encoded.
212 (with-fluids ((%default-port-encoding #f))
213 (substitute* "tests/testsuite"
214 (("/bin/sh") (which "sh")))))
215 (alist-cons-after
216 'install 'post-install
217 (lambda* (#:key inputs outputs #:allow-other-keys)
218 (let* ((out (assoc-ref %outputs "out"))
219 (bin (string-append out "/bin")))
220 (with-directory-excursion bin
221 (symlink "tcsh" "csh"))))
222 %standard-phases))))
223 (home-page "http://www.tcsh.org/")
224 (synopsis "Unix shell based on csh")
225 (description
226 "Tcsh is an enhanced, but completely compatible version of the Berkeley
227UNIX C shell (csh). It is a command language interpreter usable both as an
228interactive login shell and a shell script command processor. It includes a
229command-line editor, programmable word completion, spelling correction, a
230history mechanism, job control and a C-like syntax.")
231 (license bsd-4)))
7ccb874a
TGR
232
233(define-public zsh
234 (package
235 (name "zsh")
236 (version "5.2")
237 (source (origin
238 (method url-fetch)
239 (uri (list (string-append
240 "http://www.zsh.org/pub/zsh-" version
241 ".tar.gz")
242 (string-append
243 "http://www.zsh.org/pub/old/zsh-" version
244 ".tar.gz")))
245 (sha256
246 (base32
247 "0dsr450v8nydvpk8ry276fvbznlrjgddgp7zvhcw4cv69i9lr4ps"))))
248 (build-system gnu-build-system)
249 (arguments `(#:configure-flags '("--with-tcsetpgrp" "--enable-pcre")
ddee9a6e
TGR
250 #:phases
251 (modify-phases %standard-phases
252 (add-before 'configure 'fix-sh
253 (lambda _
254 ;; Some of the files are ISO-8859-1 encoded.
255 (with-fluids ((%default-port-encoding #f))
256 (substitute*
257 '("configure"
258 "configure.ac"
259 "Src/exec.c"
260 "Src/mkmakemod.sh"
261 "Config/installfns.sh"
262 "Config/defs.mk.in"
263 "Test/E01options.ztst"
264 "Test/A05execution.ztst"
265 "Test/A01grammar.ztst"
266 "Test/A06assign.ztst"
267 "Test/B02typeset.ztst"
268 "Completion/Unix/Command/_init_d"
269 "Util/preconfig")
270 (("/bin/sh") (which "sh")))))))))
7ccb874a
TGR
271 (native-inputs `(("autoconf" ,autoconf)))
272 (inputs `(("ncurses" ,ncurses)
273 ("pcre" ,pcre)
274 ("perl" ,perl)))
275 (synopsis "Powerful shell for interactive use and scripting")
276 (description "The Z shell (zsh) is a Unix shell that can be used
277as an interactive login shell and as a powerful command interpreter
278for shell scripting. Zsh can be thought of as an extended Bourne shell
279with a large number of improvements, including some features of bash,
280ksh, and tcsh.")
281 (home-page "http://www.zsh.org/")
282
283 ;; The whole thing is under an MIT/X11-style license, but there's one
284 ;; command, 'Completion/Unix/Command/_darcs', which is under GPLv2+.
285 (license gpl2+)))
1d515855
SR
286
287(define-public xonsh
288 (package
289 (name "xonsh")
290 (version "0.4.6")
291 (source
292 (origin
293 (method url-fetch)
294 (uri (pypi-uri "xonsh" version))
295 (sha256
296 (base32
cfb7e269
DM
297 "0byxd9kjl99q2pyvjh9jy18l0di1i35wr0qqgnw4i6jh6ig3zcki"))
298 (modules '((guix build utils)))
299 (snippet
300 `(begin
301 ;; Delete bundled ply.
302 (delete-file-recursively "xonsh/ply")
303 (substitute* '("setup.py")
304 (("'xonsh\\.ply',") ""))
305 #t))))
1d515855 306 (build-system python-build-system)
cfb7e269
DM
307 (inputs
308 `(("python-ply" ,python-ply)))
1d515855
SR
309 (home-page "http://xon.sh/")
310 (synopsis "Python-ish shell")
311 (description
312 "Xonsh is a Python-ish, BASHwards-looking shell language and command
313prompt. The language is a superset of Python 3.4+ with additional shell
314primitives that you are used to from Bash and IPython. It works on all major
315systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily
316use of experts and novices alike.")
317 (license bsd-2)))