summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/forth.scm43
1 files changed, 42 insertions, 1 deletions
diff --git a/gnu/packages/forth.scm b/gnu/packages/forth.scm
index c523887871..36f4ba5051 100644
--- a/gnu/packages/forth.scm
+++ b/gnu/packages/forth.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Nikita <[email protected]>
-;;; Copyright © 2016 Sou Bunnbu <[email protected]>
+;;; Copyright © 2016, 2025 宋文武 <[email protected]>
;;; Copyright © 2023 B. Wilson <[email protected]>
;;;
;;; This file is part of GNU Guix.
@@ -22,9 +22,11 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (gnu packages assembly)
#:use-module (gnu packages m4)
#:use-module (gnu packages vim))
@@ -63,6 +65,45 @@ included.")
(home-page "https://www.gnu.org/software/gforth/")
(license license:gpl3+)))
+(define-public freeforth2
+ (package
+ (name "freeforth2")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dan4thewin/FreeForth2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0nnbvqvv0q7mcy2paxknl97zk6vphflvqp3dy741p0kaghcpgli7"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:test-target "test"
+ #:system "i686-linux" ;requires 32-bit gcc
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output)
+ "LD=gcc -m32 -nostartfiles -lc")
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (substitute* "fflin.boot"
+ (("/usr/local/share/ff")
+ (string-append #$output "/share/ff"))
+ ;; Increase the size of ffpath for store path.
+ (("46[+] create ffpath")
+ "256+ create ffpath")))))))
+ (native-inputs (list fasm))
+ (synopsis "Lightweight x86 Forth")
+ (home-page "https://github.com/dan4thewin/FreeForth2")
+ (description
+ "FreeForth2 offers a lightweight Forth for x86 GNU/Linux that deftly
+blends assembly and Forth.")
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (license license:asl2.0)))
+
(define-public smithforth
(package
(name "smithforth")