From 18d9d22adc2050717c97a1d35ce876ee93395d76 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 22 Jan 2018 18:54:24 -0500 Subject: gnu: Add the Oil shell. * gnu/packages/shells.scm (oil-shell): New variable. --- gnu/packages/shells.scm | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'gnu/packages') diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index e374c41b95..5df9644dfc 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2016 Stefan Reichör ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2017, 2018 ng0 -;;; Copyright © 2017 Leo Famulari +;;; Copyright © 2017, 2018 Leo Famulari ;;; Copyright © 2017 Arun Isaac ;;; ;;; This file is part of GNU Guix. @@ -644,3 +644,49 @@ Korn Shell programming language and a successor to the Public Domain Korn Shell (pdksh).") (license (list miros isc)))) ; strlcpy.c + +(define-public oil-shell + (package + (name "oil-shell") + (version "0.3.0") + (source (origin + (method url-fetch) + (uri (string-append "https://www.oilshell.org/download/oil-" + version ".tar.xz")) + (sha256 + (base32 + "0j4fyn6xjaf29xqyzm09ahazmq9v1hkxv4kps7n3lzdfr32a4kk9")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; the tests are not distributed in the tarballs + #:strip-binaries? #f ; the binaries cannot be stripped + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-compiler-invocation + (lambda _ + (substitute* "configure" + ((" cc ") " gcc ")) + #t)) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "CC" "gcc") + ;; The configure script doesn't recognize CONFIG_SHELL. + (setenv "CONFIG_SHELL" (which "sh")) + (invoke "./configure" (string-append "--prefix=" out) + "--with-readline")))) + (add-before 'install 'make-destination + (lambda _ + ;; The build scripts don't create the destination directory. + (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))))))) + (inputs + `(("readline" ,readline))) + (synopsis "Bash-compatible Unix shell") + (description "Oil is a Unix / POSIX shell, compatible with Bash. It +implements the Oil language, which is a new shell language to which Bash can be +automatically translated. The Oil language is a superset of Bash. It also +implements the OSH language, a statically-parseable language based on Bash as it +is commonly written.") + (home-page "https://www.oilshell.org/") + (license (list psfl ; The Oil sources include a patched Python 2 source tree + asl2.0)))) -- cgit v1.2.3