[PATCH] gnu: Add the Oil shell.

  • Done
  • quality assurance status badge
Details
2 participants
  • Eric Bavier
  • Leo Famulari
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal

Debbugs page

Leo Famulari wrote 7 years ago
(address . guix-patches@gnu.org)
90b0beaa4ba44569fe178054c2e3e868290d9589.1516667312.git.leo@famulari.name
* gnu/packages/shells.scm (oil-shell): New variable.
---
gnu/local.mk | 1 +
gnu/packages/patches/oil-shell-compiler-name.patch | 18 +++++++++
gnu/packages/shells.scm | 44 +++++++++++++++++++++-
3 files changed, 62 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/oil-shell-compiler-name.patch

Toggle diff (97 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 240554fe4..6e3421b04 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -938,6 +938,7 @@ dist_patch_DATA = \
%D%/packages/patches/ocaml-Add-a-.file-directive.patch \
%D%/packages/patches/ocaml-findlib-make-install.patch \
%D%/packages/patches/ocaml-graph-honor-source-date-epoch.patch \
+ %D%/packages/patches/oil-shell-compiler-name.patch \
%D%/packages/patches/omake-fix-non-determinism.patch \
%D%/packages/patches/ola-readdir-r.patch \
%D%/packages/patches/openscenegraph-ffmpeg3.patch \
diff --git a/gnu/packages/patches/oil-shell-compiler-name.patch b/gnu/packages/patches/oil-shell-compiler-name.patch
new file mode 100644
index 000000000..bd55b5c32
--- /dev/null
+++ b/gnu/packages/patches/oil-shell-compiler-name.patch
@@ -0,0 +1,18 @@
+diff --git a/configure b/configure
+index c3c11d3..327f40b 100755
+--- a/configure
++++ b/configure
+@@ -85,11 +85,11 @@ done
+ # No output file, no logging, no stderr.
+ # TODO: Maybe send stdout/stderr to config.log?
+ cc_quiet() {
+- cc "$@" -o /dev/null >/dev/null 2>&1
++ gcc "$@" -o /dev/null >/dev/null 2>&1
+ }
+
+ cc_or_die() {
+- if ! cc "$@" >$TMP/cc.log 2>&1; then
++ if ! gcc "$@" >$TMP/cc.log 2>&1; then
+ log "Error running 'cc $@':"
+ cat $TMP/cc.log
+ die "Fatal compile error running feature test"
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index e374c41b9..2d6ad2486 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,45 @@ 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"))
+ (patches (search-patches "oil-shell-compiler-name.patch"))
+ (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
+ (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))))
--
2.16.0
Eric Bavier wrote 7 years ago
(name . Leo Famulari)(address . leo@famulari.name)(address . 30221@debbugs.gnu.org)
20180122163602.0bc1fee6@centurylink.net
On Mon, 22 Jan 2018 19:28:37 -0500
Leo Famulari <leo@famulari.name> wrote:

Toggle quote (8 lines)
> * gnu/packages/shells.scm (oil-shell): New variable.
> ---
> gnu/local.mk | 1 +
> gnu/packages/patches/oil-shell-compiler-name.patch | 18 +++++++++
> gnu/packages/shells.scm | 44 +++++++++++++++++++++-
> 3 files changed, 62 insertions(+), 1 deletion(-)
> create mode 100644 gnu/packages/patches/oil-shell-compiler-name.patch
>
...
Toggle quote (1 lines)
> + (license (list psfl ; The Oil sources include a patched Python 2 source tree
^
Really!? :/

Does it build its own python then too?

Otherwise looks good to me.

`~Eric
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoMXjUi7471xkzbfw/XPKxxnTJWYFAlpmZ1IACgkQ/XPKxxnT
JWbnbA//WmQzWD22t/wp9h51feaJENcVfU0fAx8ZhW19jiKgxRCFaAOwIOsiw/sP
UMcRMbrFCnfa+ow+lzvjH1oQKklBHBHA2dJaSQmjhsiD6bVry200jRSX3WLVmaWg
IJvxAZGx3lNYEM4DXMjTjsKBQD5DJHF3OJgd/Er3Q0kqlW6oy+Mlx9fOoSeyhGuj
bseKP9FQuIAYtxQXsncMVb5V7mkBSGrsRkWq4hAONiCBLowV/bcNm4NCYIuzna5e
DOttf64LfuNjUOzf7L6Q+EfLhcb3d3NMa9RpRUAuyT9yOfVb6WS/CiXuzYpPWmuu
1yGZGgRTE0qSed3BjNoPBQEAtFpYjG5G9N4YlTIJ9sqZpBNDrM32oGXozFic9yi4
OdR8tZYyurNwYMeQXXHfebN7zkzQjLc8K9wZcB4fG6GjeQwQNaThjWvdnD+2XMN8
Zo2z9G4DaQjqjGHXuhY8CKq33HtERVBLpkIwBswVsfXYUjknM/p1+jhTKr7jG7EH
XQITDXEWpvTZSFhu6UxEDQ2vG9iMThdYX5ZUUbDtKBUveScAjHCdjTEOC4PtSTOv
tIDW4hZPrO+3VTfkWWzRbwRW3T7/ZFASKLlQySp4baPmzmd3lTNvtlUVw5Dfc8lL
gXSNqflOSYyu3qtHMBlrBaDRBFDwmYAh2UBYsUAvnICSG4iRIPc=
=SZeR
-----END PGP SIGNATURE-----


Leo Famulari wrote 7 years ago
(name . Eric Bavier)(address . ericbavier@centurylink.net)(address . 30221@debbugs.gnu.org)
20180123193611.GA6750@jasmine.lan
On Mon, Jan 22, 2018 at 04:36:02PM -0600, Eric Bavier wrote:
Toggle quote (8 lines)
> On Mon, 22 Jan 2018 19:28:37 -0500
> Leo Famulari <leo@famulari.name> wrote:
> > + (license (list psfl ; The Oil sources include a patched Python 2 source tree
> ^
> Really!? :/
>
> Does it build its own python then too?

I'm not sure but I think... not exactly. I think it's a modified and
reduced CPython VM:

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpnjqgACgkQJkb6MLrK
fwh8aw//XKUP6b9gGWC4IVWWe9VZMnP07g0yDT/YdSgbUQOdJCwCsx0BOZiXWUtv
UvdLA7J/bXKDHuxuf/DnrUDyDDIgZATe82T+jHzapYh7DUDZvNFzf+pgO4tgPt5X
owEz5SI+zV2eNp7IIyZ+DDaSVBfjxlXl4DRlKXoB6kTG5kyYQZ0Gqo5eFqAZ6fx8
yVFv+wjXbZrpoy1ppGiXdLtRlUBJb8V1+BQiAueuBkJ23/6KZl93235L/XDps0Yx
PsNH1gi1cFLojE2OHz+4PZV7ztFWqO2a7qudG+d0+eGvidBwV6Gkd5FGr+y6YUvA
IqqDd/81DWWM5sqrMZdfFg1MhKMdAVZ8WT3q6nexBMmOS1+At3yPwGfyBl2E3sGi
XL8lmT/Yyit6rIHGq96JkzWYfp+VCNcMJXn1Ql2+B1YmVwi/fAwjBs6AbNIDkFXy
E2hp6TsQwoDRSsW3hVTYLlSZW+wMugPlH55b2edcTJfuCI+SKmkNlrT7mnoTbkZY
orYwo6uug+BrN+XW4PGmOkNJsFYtLfEiAM4yfuZZcf8GLMHh+tJUCxvl8HP6S0O3
MJeZZyj7gkKikNIJV6TsK5+/mhbtyqmsZ8an3BFyK1OvVLaJa4R7K1af3m6lFmKd
gyauuXXCnggrXn/Bqtwlr/VrKjUi2YO9IQZ/IJNf5VF9ek3zx5k=
=XspB
-----END PGP SIGNATURE-----


Leo Famulari wrote 7 years ago
(address . 30221-done@debbugs.gnu.org)
20180123205945.GA22358@jasmine.lan
I used (substitute*) instead of a patch file and pushed as
18d9d22adc2050717c97a1d35ce876ee93395d76.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpnokEACgkQJkb6MLrK
fwgFJRAAx12sdnwTdNUrasCs0ogPzucyml1cD+PtLL+nxY4kLkCZTOjfqi18UiBL
CmiYMuqkmrSkbNdNLJpMTxIdzWqcRCxQFZ0Vrmv+sVgeHz5l6bkG8cad8d8mQ0Uq
yTDW2gcEkjo69aXTFOO3dGXsyNCEmRKhO4Uzv8bmmjtK/OYYLWq/mhqK7M/NMVvg
FQ7vUiKq5kE6pZsY55POiuYmO/bn374Aqj366qKXyasyfYz6bQS55doSEjIep7+Q
ijanoKdLyr+qSyC9+z4zJ8tfjJjAJdc1Pkw726PcCCIuGF8kwvC6K5TxdoMVsdit
4aLEA8awNmctt2Dymk0lWOMOupoD8W0S09fOMqvOkn/fx9e6wi1ffPq5DfPTtxoC
h51yA6vdJc9n/uwjwpnGst7Z1/kYHOce9UCef5bQyRNpUsQ6HuRanNhbMiDBqwUd
yxTva+fKdT2DOjMqatSbcKHNGVq/FuYNrtpfFy9qU84Cg8s3q7yBIvx0Hy6wUZMj
TpTK90dWFssEpbvtEcayIEGihzo9WcjOM4ecQ1MfZuHzOmx+IjOV8ttmUiGoXURb
DADtP5kMno6TiCom/gG16S0qNN43Y7PbDfcJlY+qlQPkCNUON3iBrzaPRKrhEvoZ
4RZuJn13eknXmMO+eKhW86lZf7TBpW7NfMOiFQrtERiG0G1DCHw=
=8lOH
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 30221@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 30221
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help