aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2018-01-22 18:54:24 -0500
committerLeo Famulari <leo@famulari.name>2018-01-23 15:58:30 -0500
commit18d9d22adc2050717c97a1d35ce876ee93395d76 (patch)
tree339dae5b4acc11bb2a5ce1aeb546cda4dbcc5002
parentc73a00a3763aef0045dd30c252d93ce4d12e76f8 (diff)
downloadguix-18d9d22adc2050717c97a1d35ce876ee93395d76.tar
guix-18d9d22adc2050717c97a1d35ce876ee93395d76.tar.gz
gnu: Add the Oil shell.
* gnu/packages/shells.scm (oil-shell): New variable.
-rw-r--r--gnu/packages/shells.scm48
1 files changed, 47 insertions, 1 deletions
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 <stefan@xsteve.at>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2018 ng0 <ng0@n0.is>
-;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; 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))))