unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30221] [PATCH] gnu: Add the Oil shell.
  2018-01-23  0:28 [bug#30221] [PATCH] gnu: Add the Oil shell Leo Famulari
@ 2018-01-22 22:36 ` Eric Bavier
  2018-01-23 19:36   ` Leo Famulari
  2018-01-23 20:59 ` bug#30221: " Leo Famulari
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Bavier @ 2018-01-22 22:36 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 30221

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

On Mon, 22 Jan 2018 19:28:37 -0500
Leo Famulari <leo@famulari.name> wrote:

> * 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
> 
...
> +    (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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#30221] [PATCH] gnu: Add the Oil shell.
@ 2018-01-23  0:28 Leo Famulari
  2018-01-22 22:36 ` Eric Bavier
  2018-01-23 20:59 ` bug#30221: " Leo Famulari
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Famulari @ 2018-01-23  0:28 UTC (permalink / raw)
  To: 30221

* 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

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#30221] [PATCH] gnu: Add the Oil shell.
  2018-01-22 22:36 ` Eric Bavier
@ 2018-01-23 19:36   ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2018-01-23 19:36 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 30221

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

On Mon, Jan 22, 2018 at 04:36:02PM -0600, Eric Bavier wrote:
> 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:

http://www.oilshell.org/blog/2017/04/25.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#30221: [PATCH] gnu: Add the Oil shell.
  2018-01-23  0:28 [bug#30221] [PATCH] gnu: Add the Oil shell Leo Famulari
  2018-01-22 22:36 ` Eric Bavier
@ 2018-01-23 20:59 ` Leo Famulari
  1 sibling, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2018-01-23 20:59 UTC (permalink / raw)
  To: 30221-done

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]

I used (substitute*) instead of a patch file and pushed as
18d9d22adc2050717c97a1d35ce876ee93395d76.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-23 21:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23  0:28 [bug#30221] [PATCH] gnu: Add the Oil shell Leo Famulari
2018-01-22 22:36 ` Eric Bavier
2018-01-23 19:36   ` Leo Famulari
2018-01-23 20:59 ` bug#30221: " Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).