diff mbox series

[bug#37200] gnu: Add roswell.

Message ID 20190827153304.25380-1-mail@ambrevar.xyz
State Accepted
Headers show
Series [bug#37200] gnu: Add roswell. | expand

Commit Message

Pierre Neidhardt Aug. 27, 2019, 3:33 p.m. UTC
* gnu/packages/lisp.scm (roswell): New variable.
---
 gnu/packages/lisp.scm | 50 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 49 insertions(+), 1 deletion(-)

Comments

Pierre Neidhardt Aug. 27, 2019, 3:35 p.m. UTC | #1
This is a work in progress.
In particular, I know of the libcurl issue with SSL_CERT_DIR.
Is the proposed workaround appropriate?

There are still a couple more issues that need fixing.
Ludovic Courtès Sept. 16, 2019, 8:40 a.m. UTC | #2
Hello Pierre,

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

> * gnu/packages/lisp.scm (roswell): New variable.

Looks like this patch feel through the cracks…

> +           (lambda _
> +             ;; TODO: libcurl does not honor SSL_CERT_DIR et al.
> +             ;; See https://issues.guix.gnu.org/issue/25240.
> +             ;; Is the following workaround right?
> +             (substitute* "src/download.c"
> +               (("curl_easy_setopt\\(curl, CURLOPT_URL, uri\\);")
> +                "curl_easy_setopt(curl, CURLOPT_URL, uri);
> +curl_easy_setopt(curl, CURLOPT_CAINFO, \"/etc/ssl/certs/ca-certificates.crt\");"))
> +             #t)))))

Normally, it’s up to applications using libcurl to do the right thing,
which is (1) to check standard certificate locations like you did above,
and ideally (2) to check some environment variables.

Unfortunately some applications don’t do this (see for instance commit
489d16577e4a6ccc30f3719d9263900089edd842.)  In those cases, we usually
do what you did above.

In short, I think it’s a fine workaround.

> +    (description
> +     "Roswell started out as a command-line tool with the aim to make
> +installing and managing Common Lisp implementations really simple and easy.
> +Roswell has now evolved into a full-stack environment for Common Lisp
> +development, and has many features that makes it easy to test, share, and
> +distribute your Lisp applications.
> +
> +Roswell is still in beta. Despite this, the basic interfaces are stable and
> +not likely to change.")

Maybe you can drop the second paragraph since it’ll hopefully become
stale.  :-)

Thanks!

Ludo’.
Pierre Neidhardt Sept. 17, 2019, 1:05 p.m. UTC | #3
Thanks for the review!

After some discussion with upstream, it does not seem that Roswell can
be used without using a binary blob of SBCL:

https://github.com/roswell/roswell/issues/387

So I don't think that makes it a good fit for a Guix package.

A few options:

- Patch Roswell so that it takes Guix' SBCL instead of its own (could be
a lot of work).

- Patchelf the binary blob.

Thoughts?
Ludovic Courtès Sept. 18, 2019, 12:05 p.m. UTC | #4
Hi Pierre,

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

> Thanks for the review!
>
> After some discussion with upstream, it does not seem that Roswell can
> be used without using a binary blob of SBCL:
>
> https://github.com/roswell/roswell/issues/387
>
> So I don't think that makes it a good fit for a Guix package.
>
> A few options:
>
> - Patch Roswell so that it takes Guix' SBCL instead of its own (could be
> a lot of work).
>
> - Patchelf the binary blob.

It’s clear that “patchelf the binary blob” is not an option in Guix.

The description for Roswell says it’s a tool for “installing and
managing Common Lisp implementations”.  If its job is precisely to
download and run pre-built binaries, then perhaps that would require
significant changes in Roswell itself so that it patches the binaries it
downloads?

But then again, if Roswell is about downloading pre-built binaries, we
should be careful about what’s going on.  After all, that might be
partly redundant with what Guix does, except that those binaries it
downloads may be non-reproducible or may even lack and build recipe
altogether.

So… the story about these pre-built binaries raises a red flag for me,
and I’m not sure what can be done here.

Thoughts?

Ludo’.
Pierre Neidhardt Sept. 19, 2019, 6:51 a.m. UTC | #5
I initially wanted to package Roswell so that we can start packaging Lem
(https://github.com/cxxxr/lem) but Lem it turns out the Lem does not
need it anymore.

I guess "Roswell on Guix" can be dropped then.
Ludovic Courtès Sept. 19, 2019, 8:22 a.m. UTC | #6
Hi Pierre,

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

> I initially wanted to package Roswell so that we can start packaging Lem
> (https://github.com/cxxxr/lem) but Lem it turns out the Lem does not
> need it anymore.

OK.

> I guess "Roswell on Guix" can be dropped then.

Your call.  If you feel this way, feel free to close this bug.

We can always revisit the issue later if needed.

Thank you,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index d32f4b19bd..696bb393bc 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -10,7 +10,7 @@ 
 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
-;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019 Katherine Cox-Buday <cox.katherine.e@gmail.com>
 ;;; Copyright © 2019 Jesse Gildersleve <jessejohngildersleve@protonmail.com>
@@ -44,11 +44,13 @@ 
   #:use-module (guix build-system asdf)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages c)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages ed)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
@@ -679,6 +681,52 @@  libraries for Machine Learning, Neural Nets and statistical estimation.")
     (home-page "http://lush.sourceforge.net/")
     (license license:lgpl2.1+)))
 
+(define-public roswell
+  (package
+    (name "roswell")
+    (version "19.08.10.101")
+    (home-page "https://github.com/roswell/roswell/")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (sha256
+        (base32
+         "0i72vzzzjwi9lnzzl8y10pp3kq298vhzz3spvsmi8n1yalqwslbf"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("intltool" ,intltool)))
+    (inputs
+     `(("curl" ,curl)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'patch-ssl-certs
+           (lambda _
+             ;; TODO: libcurl does not honor SSL_CERT_DIR et al.
+             ;; See https://issues.guix.gnu.org/issue/25240.
+             ;; Is the following workaround right?
+             (substitute* "src/download.c"
+               (("curl_easy_setopt\\(curl, CURLOPT_URL, uri\\);")
+                "curl_easy_setopt(curl, CURLOPT_URL, uri);
+curl_easy_setopt(curl, CURLOPT_CAINFO, \"/etc/ssl/certs/ca-certificates.crt\");"))
+             #t)))))
+    (synopsis "Common Lisp implementation manager, launcher, and more")
+    (description
+     "Roswell started out as a command-line tool with the aim to make
+installing and managing Common Lisp implementations really simple and easy.
+Roswell has now evolved into a full-stack environment for Common Lisp
+development, and has many features that makes it easy to test, share, and
+distribute your Lisp applications.
+
+Roswell is still in beta. Despite this, the basic interfaces are stable and
+not likely to change.")
+    (license license:expat)))
+
 (define-public sbcl-alexandria
   (let ((revision "1")
         (commit "926a066611b7b11cb71e26c827a271e500888c30"))