;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016 Stefan Reichör <stefan@xsteve.at>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 ng0 <ng0@infotropique.org>
+;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bison)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages groff)
+ #:use-module (gnu packages libbsd)
#:use-module (gnu packages libedit)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages scheme)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix download)
(define-public dash
(package
(name "dash")
- (version "0.5.9")
+ (version "0.5.9.1")
(source
(origin
(method url-fetch)
(uri (string-append "http://gondor.apana.org.au/~herbert/dash/files/"
- name "-" version ".tar.gz"))
+ "dash-" version ".tar.gz"))
(sha256
(base32
- "17328wd9n5krr5wd37smrk0y7fdf8aa3hmhm02br5mqpq0a3nycj"))
+ "0ng695mq5ngg43h7ljhxvbjm46ym3nayj6ssn47d2gm9fbm5pkay"))
(modules '((guix build utils)))
(snippet
'(begin
(inputs
`(("libedit" ,libedit)))
(arguments
- `(#:configure-flags '("--with-libedit")))
+ '(#:configure-flags '("--with-libedit")))
(home-page "http://gondor.apana.org.au/~herbert/dash")
(synopsis "POSIX-compliant shell optimised for size")
(description
(define-public fish
(package
(name "fish")
- (version "2.4.0")
+ (version "2.6.0")
(source (origin
(method url-fetch)
(uri (string-append "https://fishshell.com/files/"
version "/fish-" version ".tar.gz"))
(sha256
(base32
- "1iggr6ah0siyak073v2w4sx1man19q8jsxns8i09qhv06crb5fq6"))
+ "1yzx73kg5ng5ivhi68756sl5hpb8869110l9fwim6gn7f7bbprby"))
(modules '((guix build utils)))
;; Don't try to install /etc/fish/config.fish.
(snippet
(inputs
`(("bc" ,bc)
("ncurses" ,ncurses)
+ ("groff" ,groff) ;for 'fish --help'
("pcre2" ,pcre2) ;don't use the bundled PCRE2
("python" ,python-wrapper))) ;for fish_config and manpage completions
(arguments
#:configure-flags '("--sysconfdir=/etc")
#:phases
(modify-phases %standard-phases
- ;; Replace 'bc' by its absolute file name in the store.
- (add-after 'unpack 'patch-bc
+ ;; Embed absolute paths to store items.
+ (add-after 'unpack 'embed-store-paths
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* '("share/functions/math.fish"
"share/functions/seq.fish")
(("\\| bc")
(string-append "| " (assoc-ref %build-inputs "bc")
- "/bin/bc"))))))))
+ "/bin/bc")))
+ (substitute* "share/functions/fish_update_completions.fish"
+ (("python") (which "python")))
+ (substitute* "share/functions/__fish_print_help.fish"
+ (("nroff") (which "nroff")))
+ #t)))))
(synopsis "The friendly interactive shell")
(description
"Fish (friendly interactive shell) is a shell focused on interactive use,
(home-page "https://fishshell.com/")
(license gpl2)))
+(define-public fish-guix
+ (package
+ (name "fish-guix")
+ (version "0.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dist.infotropique.org/fish-guix/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0xi0j9lvzh43lrj82gz52n2cjln0i0pgayngrg4hy5w4449biy0z"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; No checks.
+ #:make-flags (list
+ (string-append "PREFIX=" %output))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)))) ; No configure script.
+ (home-page "https://www.infotropique.org/projects/fish-guix/")
+ (synopsis "Fish completions for Guix")
+ (description
+ "Fish-guix provides completions for Guix for users of the fish shell.")
+ (license public-domain)))
+
(define-public rc
(package
(name "rc")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "git://github.com/rakitzis/rc.git")
+ (url "https://github.com/rakitzis/rc.git")
;; commit name 'release: rc-1.7.4'
(commit "c884da53a7c885d46ace2b92de78946855b18e92")))
(sha256
(description
"This is a reimplementation by Byron Rakitzis of the Plan 9 shell. It
has a small feature set similar to a traditional Bourne shell.")
- (home-page "http://github.com/rakitzis/rc")
+ (home-page "https://github.com/rakitzis/rc")
(license zlib)))
+(define-public es
+ (package
+ (name "es")
+ (version "0.9.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/wryun/es-shell/releases/"
+ "download/v" version "/es-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1fplzxc6lncz2lv2fyr2ig23rgg5j96rm2bbl1rs28mik771zd5h"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 're-enter-rootdir
+ ;; The tarball has no folder.
+ (lambda _
+ (chdir ".."))))))
+ (inputs
+ `(("readline" ,readline)))
+ (native-inputs
+ `(("bison" ,bison)))
+ (synopsis "Extensible shell with higher-order functions")
+ (description
+ "Es is an extensible shell. The language was derived from the Plan 9
+shell, rc, and was influenced by functional programming languages, such as
+Scheme, and the Tcl embeddable programming language. This implementation is
+derived from Byron Rakitzis's public domain implementation of rc, and was
+written by Paul Haahr and Byron Rakitzis.")
+ (home-page "https://wryun.github.io/es-shell/")
+ (license public-domain)))
+
(define-public tcsh
(package
(name "tcsh")
- (version "6.18.01")
+ (version "6.20.00")
(source (origin
(method url-fetch)
;; Old tarballs are moved to old/.
"old/tcsh-" version ".tar.gz")))
(sha256
(base32
- "1a4z9kwgx1iqqzvv64si34m60gj34p7lp6rrcrb59s7ka5wa476q"))
+ "17ggxkkn5skl0v1x0j6hbv5l0sgnidfzwv16992sqkdm983fg7dq"))
(patches (search-patches "tcsh-fix-autotest.patch"
- "tcsh-do-not-define-BSDWAIT.patch"))
+ "tcsh-fix-out-of-bounds-read.patch"))
(patch-flags '("-p0"))))
(build-system gnu-build-system)
- (inputs
+ (native-inputs
`(("autoconf" ,autoconf)
- ("coreutils" ,coreutils)
- ("ncurses" ,ncurses)))
+ ("perl" ,perl)))
+ (inputs
+ `(("ncurses" ,ncurses)))
(arguments
`(#:phases
- (alist-cons-before
- 'check 'patch-test-scripts
- (lambda _
- ;; Take care of pwd
- (substitute* '("tests/commands.at" "tests/variables.at")
- (("/bin/pwd") (which "pwd")))
- ;; The .at files create shell scripts without shebangs. Erk.
- (substitute* "tests/commands.at"
- (("./output.sh") "/bin/sh output.sh"))
- (substitute* "tests/syntax.at"
- (("; other_script.csh") "; /bin/sh other_script.csh"))
- ;; Now, let's generate the test suite and patch it
- (system* "make" "tests/testsuite")
+ (modify-phases %standard-phases
+ (add-before 'check 'patch-test-scripts
+ (lambda _
+ ;; Take care of pwd
+ (substitute* '("tests/commands.at" "tests/variables.at")
+ (("/bin/pwd") (which "pwd")))
+ ;; The .at files create shell scripts without shebangs. Erk.
+ (substitute* "tests/commands.at"
+ (("./output.sh") "/bin/sh output.sh"))
+ (substitute* "tests/syntax.at"
+ (("; other_script.csh") "; /bin/sh other_script.csh"))
+ ;; Now, let's generate the test suite and patch it
+ (system* "make" "tests/testsuite")
- ;; This file is ISO-8859-1 encoded.
- (with-fluids ((%default-port-encoding #f))
- (substitute* "tests/testsuite"
- (("/bin/sh") (which "sh")))))
- (alist-cons-after
- 'install 'post-install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (with-directory-excursion bin
- (symlink "tcsh" "csh"))))
- %standard-phases))))
+ ;; This file is ISO-8859-1 encoded.
+ (with-fluids ((%default-port-encoding #f))
+ (substitute* "tests/testsuite"
+ (("/bin/sh") (which "sh"))))
+ #t))
+ (add-after 'install 'post-install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (with-directory-excursion bin
+ (symlink "tcsh" "csh"))
+ #t))))))
(home-page "http://www.tcsh.org/")
(synopsis "Unix shell based on csh")
(description
(define-public xonsh
(package
(name "xonsh")
- (version "0.4.7")
+ (version "0.5.12")
(source
(origin
(method url-fetch)
(uri (pypi-uri "xonsh" version))
(sha256
(base32
- "04b0z41mxiwsp5rl21fzrixcdmx2kndjlh4gn3582qfga9hihf20"))
+ "1yz595hx5bni524m73cx8a08vcr6vfksfci14nx2ylz53igzva2c"))
(modules '((guix build utils)))
(snippet
`(begin
;; Delete bundled ply.
(delete-file-recursively "xonsh/ply")
(substitute* '("setup.py")
- (("'xonsh\\.ply',") ""))
+ (("'xonsh\\.ply\\.ply',") ""))
#t))))
(build-system python-build-system)
(arguments
(synopsis "Python-ish shell")
(description
"Xonsh is a Python-ish, BASHwards-looking shell language and command
-prompt. The language is a superset of Python 3.4+ with additional shell
-primitives that you are used to from Bash and IPython. It works on all major
-systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily
+prompt. The language is a superset of Python 3.4+ with additional shell
+primitives that you are used to from Bash and IPython. It works on all major
+systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily
use of experts and novices alike.")
(license bsd-2)))
+
+(define-public scsh
+ (let ((commit "114432435e4eadd54334df6b37fcae505079b49f")
+ (revision "1"))
+ (package
+ (name "scsh")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/scheme/scsh")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1ghk08akiz7hff1pndi8rmgamgcrn2mv9asbss9l79d3c2iaav3q"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'replace-rx
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((rx (assoc-ref inputs "scheme48-rx"))
+ (rxpath (string-append rx "/share/scheme48-"
+ ,(package-version scheme48)
+ "/rx")))
+ (delete-file-recursively "rx")
+ (symlink rxpath "rx"))
+ #t))
+ (add-after 'unpack 'autoreconf
+ (lambda _
+ (zero? (system* "autoreconf")))))))
+ (inputs
+ `(("scheme48" ,scheme48)
+ ("scheme48-rx" ,scheme48-rx)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)))
+ (home-page "https://github.com/scheme/scsh")
+ (synopsis "Unix shell embedded in Scheme")
+ (description
+ "Scsh is a Unix shell embedded in Scheme. Scsh has two main
+components: a process notation for running programs and setting up pipelines
+and redirections, and a complete syscall library for low-level access to the
+operating system.")
+ (license bsd-3))))
+
+(define-public linenoise
+ (let ((commit "2105ce445821381cf1bca87b6d386d4ea88ee20d")
+ (revision "1"))
+ (package
+ (name "linenoise")
+ (version (string-append "1.0-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/antirez/linenoise")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1z16qwix8z6a40fskdgxsibkqgdrp4q6ncp4n6hnv4r9iihy2d8r"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;No tests are included
+ #:make-flags (list "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; At the moment there is no 'make install' in upstream.
+ (let* ((out (assoc-ref outputs "out")))
+ (install-file "linenoise.h"
+ (string-append out "/include/linenoise"))
+ (install-file "linenoise.c"
+ (string-append out "/include/linenoise"))
+ #t))))))
+ (home-page "https://github.com/antirez/linenoise")
+ (synopsis "Minimal zero-config readline replacement")
+ (description
+ "Linenoise is a minimal, zero-config, readline replacement.
+Its features include:
+
+@enumerate
+@item Single and multi line editing mode with the usual key bindings
+@item History handling
+@item Completion
+@item Hints (suggestions at the right of the prompt as you type)
+@item A subset of VT100 escapes, ANSI.SYS compatible
+@end enumerate\n")
+ (license bsd-2))))
+
+(define-public s-shell
+ (let ((commit "6604341edb3a775ff94415762af3ee9bd86bfb3c")
+ (revision "1"))
+ (package
+ (name "s-shell")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rain-1/s")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1075cml6dl15d770j3m12yz90cjacsdslbv3gank1nxd76vmpdcr"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("linenoise" ,linenoise)))
+ (arguments
+ `(#:tests? #f
+ #:make-flags (list "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'install-directory-fix
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (substitute* "Makefile"
+ (("out") bin))
+ #t)))
+ (add-after 'install 'manpage
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "s.1" (string-append (assoc-ref outputs "out")
+ "/share/man/man1"))))
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; At this point linenoise is meant to be included,
+ ;; so we have to really copy it into the working directory
+ ;; of s.
+ (let* ((linenoise (assoc-ref inputs "linenoise"))
+ (noisepath (string-append linenoise "/include/linenoise"))
+ (out (assoc-ref outputs "out")))
+ (copy-recursively noisepath "linenoise")
+ (substitute* "s.c"
+ (("/bin/s") (string-append out "/bin/s")))
+ #t))))))
+ (home-page "https://github.com/rain-1/s")
+ (synopsis "Extremely minimal shell with the simplest syntax possible")
+ (description
+ "S is a new shell that aims to be extremely simple.
+S does not implemnt the POSIX shell standard.
+There are no globs or \"splatting\" where a variable $FOO turns into multiple
+command line arguments. One token stays one token forever.
+This is a \"no surprises\" straightforward approach.
+
+There are no redirection operators > in the shell language, they are added as
+extra programs. > is just another unix command, < is essentially cat(1).
+A @code{andglob} program is also provided along with s.")
+ (license bsd-3))))
+
+(define-public oksh
+ (package
+ (name "oksh")
+ (version "0.5.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://connochaetos.org/oksh/oksh-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ln9yf6pxngsviqszv8klnnvn8vcpplvj1njdn8xr2y8frkbw8r3"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(; The test files are not part of the distributed tarball.
+ #:tests? #f))
+ (home-page "https://connochaetos.org/oksh")
+ (synopsis "Port of OpenBSD Korn Shell")
+ (description
+ "Oksh is a port of the OpenBSD Korn Shell.
+The OpenBSD Korn Shell is a cleaned up and enhanced ksh.")
+ (license gpl3+)))
+
+(define-public loksh
+ (package
+ (name "loksh")
+ (version "6.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/dimkr/loksh/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1wg7ds56yr8fgg1m149bi53bvrwccwiashmwknggza1sqgj9m2lq"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libbsd" ,libbsd)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:tests? #f ;No tests included
+ #:make-flags (list "CC=gcc" "HAVE_LIBBSD=1"
+ (string-append "DESTDIR="
+ (assoc-ref %outputs "out"))
+ "PREFIX=")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)))) ;No configure script
+ (home-page "https://github.com/dimkr/loksh")
+ (synopsis "Korn Shell from OpenBSD")
+ (description
+ "loksh is a Linux port of OpenBSD's @command{ksh}. It is a small,
+interactive POSIX shell targeted at resource-constrained systems.")
+ ;; The file 'LEGAL' says it is the public domain, and the 2
+ ;; exceptions which are listed are not included in this port.
+ (license public-domain)))
+
+(define-public mksh
+ (package
+ (name "mksh")
+ (version "56")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R"
+ version ".tgz"))
+ (sha256
+ (base32
+ "1x4zjj9259ijpf8jw0nyh1fnr1pbm5fwvylclpvcrlb45xrglf5d"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; tests require access to /dev/tty
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (setenv "CC" "gcc")
+ (zero? (system* (which "sh") "Build.sh"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (man (string-append out "/share/man/man1")))
+ (install-file "mksh" bin)
+ (with-directory-excursion bin
+ (symlink "mksh" "ksh"))
+ (install-file "mksh.1" man)))))))
+ (home-page "https://www.mirbsd.org/mksh.htm")
+ (synopsis "Korn Shell from MirBSD")
+ (description "mksh is an actively developed free implementation of the
+Korn Shell programming language and a successor to the Public Domain Korn
+Shell (pdksh).")
+ (license (list miros
+ isc)))) ; strlcpy.c