unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Ramin Honary <ramin.honary@gmail.com>
Cc: 65494-done@debbugs.gnu.org
Subject: bug#65494: [PATCH] gnu: Add stklos.
Date: Thu, 14 Sep 2023 16:12:11 +0200	[thread overview]
Message-ID: <877cosc090.fsf@gnu.org> (raw)
In-Reply-To: <CAFhnQTTRoqarXAcfV_fKmYtSbDhUcgLOiUxuM6CT0V-WF4A5Sg@mail.gmail.com> (Ramin Honary's message of "Thu, 24 Aug 2023 18:05:26 +0900")

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

Hi Romain,

Ramin Honary <ramin.honary@gmail.com> skribis:

> From 465538f4b2824f49d99e4eef799f25f644a37bbc Mon Sep 17 00:00:00 2001
> Message-Id: <465538f4b2824f49d99e4eef799f25f644a37bbc.1692867653.git.ramin.honary@cross-compass.com>
> From: Ramin Honary <ramin.honary@cross-compass.com>
> Date: Thu, 24 Aug 2023 17:57:51 +0900
> Subject: [PATCH] gnu: Add stklos.
>
> * gnu/packages/scheme.scm (stklos): New variable.

I went ahead and committed with the changes below.  I used ‘which’
instead of ‘(search-input-file inputs …)’ because we really want the
native bash and rm here.  The license is GPLv2+ because files under lib/
explicitly say “or any later version”.

Last, I noticed that the tarball comes with copies of libgc, libffi, and
PCRE.  Could you send patches to “unbundle” them—i.e., add these
packages to the ‘inputs’ field and ensure the build system picks them
up?

Thanks!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2262 bytes --]

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 0165875b93..ad06d7db06 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -1242,6 +1242,7 @@ (define-public stklos
     (version "1.70")
     (source (origin
               (method url-fetch)
+              ;; TODO: Unbundle pcre, libgc, and libffi.
               (uri (string-append "https://stklos.net/download/stklos-"
                                   version ".tar.gz"))
               (sha256
@@ -1254,22 +1255,18 @@ (define-public stklos
                   ,@%gnu-build-system-modules)
       #:phases
       #~(modify-phases %standard-phases
-          (add-before 'configure 'patch-sh-paths
+          (add-before 'configure 'patch-sh-references
             (lambda* (#:key inputs #:allow-other-keys)
-              (let ((bash-bin (search-input-file inputs "/bin/bash")))
+              (let ((bash (which "bash")))
                 (substitute* "configure"
-                  (("/bin/sh") bash-bin)))))
-          (add-after 'configure 'patch-rm-paths
-            (lambda* (#:key inputs #:allow-other-keys)
-              (let ((rm-bin (search-input-file inputs "/bin/rm")))
-                (ftw "."
-                     (lambda (filename stat-info f)
-                       (when (and
-                              (equal? f 'regular)
-                              (string=? (basename filename) "Makefile"))
-                         (substitute* filename
-                           (("/bin/rm") rm-bin)))
-                       #t))))))))
+                  (("/bin/sh") bash)))))
+          (add-after 'configure 'patch-rm-references
+            (lambda _
+              (let ((rm (which "rm")))
+                (substitute* (find-files "." "^Makefile$")
+                  (("/bin/rm") rm))))))))
+    (properties
+     '((release-monitoring-url . "https://stklos.net/download.html")))
     (home-page "https://stklos.net")
     (synopsis "R7RS Scheme with CLOS-like object system")
     (description
@@ -1278,4 +1275,4 @@ (define-public stklos
 as well as light.  The implementation is based on an ad-hoc Virtual
 Machine.  STklos can also be compiled as a library and embedded in an
 application.")
-    (license gpl2)))
+    (license gpl2+)))

      reply	other threads:[~2023-09-14 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24  9:05 [bug#65494] [PATCH] gnu: Add stklos Ramin Honary
2023-09-14 14:12 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cosc090.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=65494-done@debbugs.gnu.org \
    --cc=ramin.honary@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).