unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: 70229@debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>,
	glv@posteo.net, cox.katherine.e+guix@gmail.com,
	me@bonfacemunyoki.com, sharlatanus@gmail.com, jgart@dismail.de
Subject: [bug#70229] [PATCH] gnu: Add tr7.
Date: Sat,  6 Apr 2024 09:32:09 +0300	[thread overview]
Message-ID: <c69a9be1151de4eccd5095aeaf907a11d6073626.1712385129.git.poptsov.artyom@gmail.com> (raw)

* gnu/packages/scheme.scm (tr7): New variable.

Change-Id: I60e34f0f918ea7c9b36cea02358d69ab7bfad24b
---
 gnu/packages/scheme.scm | 67 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 66 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 070696d6ba..926deaeade 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2023 Juliana Sims <juli@incana.org>
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2024 Skylar Hill <stellarskylark@posteo.net>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,7 +45,8 @@ (define-module (gnu packages scheme)
   #:use-module (gnu packages)
   #:use-module ((guix licenses)
                 #:select (gpl2 gpl2+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ asl2.0
-                          bsd-3 cc-by-sa4.0 non-copyleft expat public-domain))
+                          bsd-0 bsd-3 cc-by-sa4.0 non-copyleft expat
+                          public-domain))
   #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -855,6 +857,69 @@ (define-public tinyscheme
 small program, it is easy to comprehend, get to grips with, and use.")
     (license bsd-3)))                   ; there are no licence headers
 
+(define-public tr7
+  (package
+    (name "tr7")
+    (version "1.0.10")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/jobol/tr7")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "0n77fkm5kcv2pmwbw5fl8r00aarw8da8gkd9d1ki5fn9kbl4fyk2"))
+       (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (replace 'configure
+                     (lambda _
+                       (substitute* "Makefile"
+                         (("PREFIX = /usr/local")
+                          (string-append "PREFIX="
+                                         #$output))
+                         (("ALL = \\$\\(LIBSTA\\) \\$\\(TR7I\\) tags")
+                          "ALL = $(LIBSTA) $(TR7I)"))))
+                   (replace 'build
+                     (lambda _
+                       (setenv "CC"
+                               #$(cc-for-target))
+                       (invoke "make")))
+                   (replace 'check
+                     (lambda* (#:key tests? #:allow-other-keys)
+                       (when tests?
+                         (invoke "make" "test"))))
+                   (replace 'install
+                     (lambda _
+                       (let* ((share (string-append #$output "/share"))
+                              (doc (string-append #$output:doc "/share/doc/"))
+                              (bin (string-append #$output "/bin"))
+                              (lib (string-append #$output "/lib/"))
+                              (tr7 (string-append share "/tr7"))
+                              (libs (string-append tr7 "/libs")))
+                         (for-each mkdir-p
+                                   (list tr7 libs bin lib doc))
+                         (copy-file "tr7i"
+                                    (string-append bin "/tr7i"))
+                         (copy-file "libtr7.a"
+                                    (string-append lib "/libtr7.a"))
+                         (copy-file "r7rs.pdf"
+                                    (string-append doc "/r7rs.pdf"))
+                         (copy-recursively "tr7libs" libs)))))))
+    (home-page "https://gitlab.com/jobol/tr7")
+    (synopsis "Embedded R7RS small Scheme interpreter")
+    (description
+     "@code{TR7} is a lightweight Scheme interpreter that implements the revision
+R7RS small of scheme programming language.
+
+It is meant to be used as an embedded scripting interpreter for other programs.  A
+lot of functionality in TR7 is included conditionally, to allow developers freedom in
+balancing features and footprint.")
+    (license bsd-0)))
+
 (define-public stalin
   (let ((commit "ed1c9e339c352b7a6fee40bb2a47607c3466f0be"))
     ;; FIXME: The Stalin "source" contains C code generated by itself:

base-commit: bfc614397b5f146056bda4b5a8e3a67bd1ca7b23
-- 
2.41.0





             reply	other threads:[~2024-04-06  6:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-06  6:32 Artyom V. Poptsov [this message]
2024-04-15 10:33 ` bug#70229: [PATCH] gnu: Add tr7 Nicolas Goaziou via Guix-patches via

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=c69a9be1151de4eccd5095aeaf907a11d6073626.1712385129.git.poptsov.artyom@gmail.com \
    --to=poptsov.artyom@gmail.com \
    --cc=70229@debbugs.gnu.org \
    --cc=cox.katherine.e+guix@gmail.com \
    --cc=glv@posteo.net \
    --cc=jgart@dismail.de \
    --cc=me@bonfacemunyoki.com \
    --cc=sharlatanus@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).