From: "B. Wilson via Guix-patches" via <guix-patches@gnu.org>
To: 65934@debbugs.gnu.org
Cc: "B. Wilson" <elaexuotee@wilsonb.com>
Subject: [bug#65934] [PATCH] gnu: Add smithforth.
Date: Thu, 14 Sep 2023 14:27:09 +0900 [thread overview]
Message-ID: <20230914052721.27820-1-elaexuotee@wilsonb.com> (raw)
* gnu/packages/forth (smithforth): New variable.
---
gnu/packages/forth.scm | 55 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/forth.scm b/gnu/packages/forth.scm
index 8cb6ac8391..9910243ac1 100644
--- a/gnu/packages/forth.scm
+++ b/gnu/packages/forth.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2023 B. Wilson <elaexuotee@wilsonb.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,7 +23,9 @@ (define-module (gnu packages forth)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
- #:use-module (gnu packages m4))
+ #:use-module (guix build-system trivial)
+ #:use-module (gnu packages m4)
+ #:use-module (gnu packages vim))
(define-public gforth
(package
@@ -58,3 +61,53 @@ (define-public gforth
included.")
(home-page "https://www.gnu.org/software/gforth/")
(license license:gpl3+)))
+
+(define-public smithforth
+ (package
+ (name "smithforth")
+ (version "220711")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dacvs.neocities.org/SF/SForth"
+ version "dmp.txt"))
+ (sha256
+ (base32 "0a39pv7529llsa3f48fmvwvlcp3f9v8qkn5ziw2l6kxf0qvli3lm"))))
+ (build-system trivial-build-system)
+ (inputs
+ `(("system.fs"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append "https://dacvs.neocities.org/SF/system"
+ version "fs.txt"))
+ (sha256
+ (base32
+ "17v1pp64s6n8q8w3kg48nd7zdcx2208y4svr5fpfms5lkyzg7z1m"))))))
+ (native-inputs (list xxd))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils)
+ (ice-9 textual-ports))
+ (let* ((sforth.dmp (assoc-ref %build-inputs "source"))
+ (system.fs (assoc-ref %build-inputs "system.fs"))
+ (xxd (string-append (assoc-ref %build-inputs "xxd")
+ "/bin/xxd"))
+ (bin (string-append (assoc-ref %outputs "out") "/bin")))
+ (copy-file sforth.dmp "sforth.dmp")
+ (substitute* "sforth.dmp" (("#.*$") "\n"))
+ (with-output-to-file "sforth"
+ (lambda _
+ (invoke xxd "-p" "-r" "sforth.dmp")
+ (call-with-input-file system.fs
+ (lambda (port) (display (get-string-all port)))))
+ #:binary #t)
+ (chmod "sforth" #o755)
+ (install-file "sforth" bin)))))
+ (home-page "https://dacvs.neocities.org/SF/")
+ (synopsis "Forth programming language for x86-64 desktop computers")
+ (description "SmithForth is an implementation of the Forth programming
+language for x86-64 desktop computers. SmithForth is a text interpreter that
+runs in a Linux text console.")
+ (license license:expat-0)))
--
2.41.0
next reply other threads:[~2023-09-14 5:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 5:27 B. Wilson via Guix-patches via [this message]
2023-10-05 12:46 ` [bug#65934] [PATCH] gnu: Add smithforth Ludovic Courtès
2023-10-05 14:35 ` B. Wilson via Guix-patches via
2023-10-05 15:01 ` B. Wilson via Guix-patches via
2023-10-08 21:38 ` bug#65934: " Ludovic Courtès
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=20230914052721.27820-1-elaexuotee@wilsonb.com \
--to=guix-patches@gnu.org \
--cc=65934@debbugs.gnu.org \
--cc=elaexuotee@wilsonb.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).