GNU bug report logs - #72776
[PATCH] gnu: Add oils.

Previous Next

Package: guix-patches;

Reported by: Giacomo Leidi <goodoldpaul <at> autistici.org>

Date: Fri, 23 Aug 2024 22:18:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72776 in the body.
You can then email your comments to 72776 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#72776; Package guix-patches. (Fri, 23 Aug 2024 22:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Giacomo Leidi <goodoldpaul <at> autistici.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 23 Aug 2024 22:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: guix-patches <at> gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [PATCH] gnu: Add oils.
Date: Sat, 24 Aug 2024 00:16:45 +0200
Since release 0.16.0 the former Oil project has been renamed to
Oils (https://www.oilshell.org/blog/2023/03/rename.html).  This patch
deprecates the old oil package in favor of a new oils package updated to
the latest version.  Additionally since release 0.21.0 Oils is
completely free from bundled Python code.

* gnu/packages/shells.scm (oils): New variable;
[source]: Remove mention of bundled Python sources, from release 0.21.0
it is no more the case;
[phases]: use Oils build system.
(oil): Deprecate in favor of oils.

Change-Id: I4455ec1e6f4335cc6e67cd8f2c3808e2aef24c4f
---
 gnu/packages/shells.scm | 52 ++++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index d7fb2317cb..9e08ef39f0 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2023 Jaeme Sifat <jaeme <at> runbox.com>
 ;;; Copyright © 2024 Tanguy Le Carrour <tanguy <at> bioneland.org>
 ;;; Copyright © 2024 Vinicius Monego <monego <at> posteo.net>
+;;; Copyright © 2024 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -90,6 +91,7 @@ (define-module (gnu packages shells)
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module (guix deprecation)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix gexp)
@@ -905,27 +907,20 @@ (define-public mksh
     (license (list license:miros
                    license:isc))))              ; strlcpy.c
 
-(define-public oil
+(define-public oils
   (package
-    (name "oil")
-    (version "0.20.0")
+    (name "oils")
+    (version "0.22.0")
     (source
-     ;; oil's sources contain a modified version of CPython 2.7.13.
-     ;; According to https://www.oilshell.org/blog/2017/05/05.html
-     ;; this bundles version of CPython had certain unused parts removed
-     ;; and its build system has been replaced by a custom one.
-     ;; This would probably make it quite complicated to replace the
-     ;; bundled CPython with the one from the python2 package.
      (origin
        (method url-fetch)
-       (uri (string-append "https://www.oilshell.org/download/oil-"
+       (uri (string-append "https://www.oilshell.org/download/oils-for-unix-"
                            version ".tar.gz"))
        (sha256
-        (base32 "1jpxhixwq29ik01jx372g9acib59wmww8lrdlcypq7jpg5b0b7pi"))))
+        (base32 "0pylgbxbnp683g51lcbmmd0y149jm7q7vh8g67yviagsa7clmmks"))))
     (build-system gnu-build-system)
     (arguments
-     (list #:strip-binaries? #f         ; strip breaks the binary
-           #:phases
+     (list #:phases
            #~(modify-phases %standard-phases
                (replace 'configure
                  (lambda _
@@ -934,24 +929,37 @@ (define-public oil
                      ((" cc ") " $CC "))
                    (invoke "./configure" (string-append "--prefix=" #$output)
                            "--with-readline")))
+               (replace 'build
+                 (lambda _
+                   (invoke "_build/oils.sh")))
+               (replace 'install
+                 (lambda _
+                   (setenv "PREFIX" #$output)
+                   (invoke "./install")))
                (replace 'check
                  ;; The tests are not distributed in the tarballs but upstream
                  ;; recommends running this smoke test.
-                 ;; https://github.com/oilshell/oil/blob/release/0.8.0/INSTALL.txt#L38-L48
+                 ;; https://github.com/oilshell/oil/blob/release/0.22.0/INSTALL.txt#L30-L50
                  (lambda* (#:key tests? #:allow-other-keys)
                    (when tests?
-                     (let* ((oil "_bin/oil.ovm"))
-                       (invoke/quiet oil "osh" "-c" "echo hi")
-                       (invoke/quiet oil "osh" "-n" "configure"))))))))
+                     (let ((osh "_bin/cxx-opt-sh/osh")
+                           (ysh "_bin/cxx-opt-sh/ysh"))
+                       (invoke/quiet osh "-c" "echo hi")
+                       (invoke/quiet osh "-n" "configure")
+                       (invoke/quiet ysh "-c" "echo hi")
+                       (invoke/quiet ysh "-c"
+                                     "json write ({x: 42})"))))))))
     (inputs
      (list readline))
     (home-page "https://www.oilshell.org")
     (synopsis "Programming language and Bash-compatible Unix shell")
-    (description "Oil is a programming language with automatic translation for
-Bash.  It includes osh, a Unix/POSIX shell that runs unmodified Bash
-scripts.")
-    (license (list license:psfl                 ; tarball includes python2.7
-                   license:asl2.0))))
+    (description "Oils is a programming language with automatic translation for
+Bash.  It includes OSH, a Unix/POSIX shell that runs unmodified Bash
+scripts and YSH is a legacy-free shell, with structured data for Python and
+JavaScript users who avoid shell.")
+    (license (list license:asl2.0))))
+
+(define-deprecated/public-alias oil oils)
 
 (define-public gash
   (package

base-commit: d48af5cca84914d44b032d0bf0820640ebbe7a4b
-- 
2.45.2





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 04 Oct 2024 15:54:01 GMT) Full text and rfc822 format available.

Notification sent to Giacomo Leidi <goodoldpaul <at> autistici.org>:
bug acknowledged by developer. (Fri, 04 Oct 2024 15:54:02 GMT) Full text and rfc822 format available.

Message #10 received at 72776-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Giacomo Leidi <goodoldpaul <at> autistici.org>
Cc: 72776-done <at> debbugs.gnu.org
Subject: Re: [bug#72776] [PATCH] gnu: Add oils.
Date: Fri, 04 Oct 2024 17:53:19 +0200
[Message part 1 (text/plain, inline)]
Giacomo Leidi <goodoldpaul <at> autistici.org> skribis:

> Since release 0.16.0 the former Oil project has been renamed to
> Oils (https://www.oilshell.org/blog/2023/03/rename.html).  This patch
> deprecates the old oil package in favor of a new oils package updated to
> the latest version.  Additionally since release 0.21.0 Oils is
> completely free from bundled Python code.
>
> * gnu/packages/shells.scm (oils): New variable;
> [source]: Remove mention of bundled Python sources, from release 0.21.0
> it is no more the case;
> [phases]: use Oils build system.
> (oil): Deprecate in favor of oils.
>
> Change-Id: I4455ec1e6f4335cc6e67cd8f2c3808e2aef24c4f

Applied with the change below, thanks!

Ludo'.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 79f1c8a0a5..fa85704d37 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -93,7 +93,6 @@ (define-module (gnu packages shells)
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
-  #:use-module (guix deprecation)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix gexp)
@@ -970,7 +969,10 @@ (define-public oils
 JavaScript users who avoid shell.")
     (license (list license:asl2.0))))
 
-(define-deprecated/public-alias oil oils)
+(define-public oil
+  ;; Since release 0.16.0 the former Oil project has been renamed to Oils:
+  ;; <https://www.oilshell.org/blog/2023/03/rename.html>.
+  (deprecated-package "oil" oils))
 
 (define-public gash
   (package

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 02 Nov 2024 11:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.