all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: 30753@debbugs.gnu.org
Subject: [bug#30753] [PATCH] gnu: Add tinyscheme.
Date: Fri,  9 Mar 2018 02:58:50 +0100	[thread overview]
Message-ID: <20180309015850.12682-1-me@tobias.gr> (raw)

* gnu/packages/scheme.scm (tinyscheme): New public variable.
---

Guix,

Another old patch.

It's Scheme! It's Tiny! It sounded familiar on #bootstrappable!

Kind regards,

T G-R

 gnu/packages/scheme.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 8947509cb..a5ca77894 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -951,3 +951,70 @@ implementation includes Hobbit, a Scheme-to-C compiler, which can
 generate C files whose binaries can be dynamically or statically
 linked with a SCM executable.")
     (license lgpl3+)))
+
+(define-public tinyscheme
+  (package
+    (name "tinyscheme")
+    (version "1.41")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/" name "/" name "/"
+                                  name "-" version "/" name "-" version ".zip"))
+              (sha256
+               (base32
+                "0yqma4jrjgj95f3hf30h542x97n8ah234n19yklbqq0phfsa08wf"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("unzip" ,unzip)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key source #:allow-other-keys)
+             (invoke "unzip" source)
+             (chdir (string-append ,name "-" ,version))
+             #t))
+         (add-after 'unpack 'set-scm-directory
+           ;; Hard-code ‘our’ init.scm instead of looking in the current
+           ;; working directory, so invoking ‘scheme’ just works.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (scm (string-append out "/share/" ,name)))
+               (substitute* "scheme.c"
+                 (("init.scm" all)
+                  (string-append scm "/" all)))
+               #t)))
+         (delete 'configure)            ; no configure script
+         (replace 'install
+           ;; There's no ‘install’ target.  Install files manually.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out     (assoc-ref outputs "out"))
+                    (bin     (string-append out "/bin"))
+                    (doc     (string-append out "/share/doc/"
+                                            ,name "-" ,version))
+                    (include (string-append out "/include"))
+                    (lib     (string-append out "/lib"))
+                    (scm     (string-append out "/share/" ,name)))
+               (install-file "scheme" bin)
+               (install-file "Manual.txt" doc)
+               (install-file "scheme.h" include)
+               (install-file "libtinyscheme.so" lib)
+               (install-file "init.scm" scm)
+               #t))))
+       #:tests? #f))                    ; no tests
+    (home-page "http://tinyscheme.sourceforge.net/")
+    (synopsis "Light-weight interpreter for the Scheme programming language")
+    (description
+     "TinyScheme is a light-weight Scheme interpreter that implements as large a
+subset of R5RS as was possible without getting very large and complicated.
+
+It's meant to be used as an embedded scripting interpreter for other programs.
+As such, it does not offer an Integrated Development Environment (@dfn{IDE}) or
+extensive toolkits, although it does sport a small (and optional) top-level
+loop.
+
+As an embedded interpreter, it allows multiple interpreter states to coexist in
+the same program, without any interference between them.  Foreign functions in C
+can be added and values can be defined in the Scheme environment.  Being quite a
+small program, it is easy to comprehend, get to grips with, and use.")
+    (license bsd-3)))                   ; there are no licence headers
-- 
2.15.1

             reply	other threads:[~2018-03-09  2:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09  1:58 Tobias Geerinckx-Rice [this message]
2018-03-09  5:48 ` [bug#30753] [PATCH] gnu: Add tinyscheme Danny Milosavljevic
2018-03-21 17:41 ` bug#30753: " Tobias Geerinckx-Rice

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

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

  git send-email \
    --in-reply-to=20180309015850.12682-1-me@tobias.gr \
    --to=me@tobias.gr \
    --cc=30753@debbugs.gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.