aboutsummaryrefslogtreecommitdiff
;;; 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.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages forth)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (gnu packages m4)
  #:use-module (gnu packages vim))

(define-public gforth
  (package
    (name "gforth")
    (version "0.7.3")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/gforth/gforth-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig"))))
    (build-system gnu-build-system)
    (arguments
     '(#:parallel-build? #f             ; XXX: parallel build fails
       #:phases
       (modify-phases %standard-phases
         (add-after 'install 'install-gforth.el
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out           (assoc-ref outputs "out"))
                    (emacs-sitedir (string-append
                                    out "/share/emacs/site-lisp")))
               ;; TODO: compile and autoload it.
               (install-file "gforth.el" emacs-sitedir)
               #t))))))
    (native-inputs
     (list m4))
    (synopsis "Forth interpreter")
    (description
     "Gforth is a fast and portable implementation of the ANSI Forth language.
It includes an editing mode for Emacs and an interpreter featuring completion
and history.  A generic virtual machine environment, vmgen, is also
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)
    (native-inputs (list xxd))
    (arguments
      (list
        #:modules '((guix build utils))
        #:builder
        #~(begin
            (use-modules (guix build utils)
                         (ice-9 textual-ports))
            (let* ((sforth.dmp #$(package-source this-package))
                   (system.fs  #$(origin
                                   (method url-fetch)
                                   (uri (string-append
                                          "https://dacvs.neocities.org/SF/system"
                                          version "fs.txt"))
                                   (sha256
                                    (base32
                                     "17v1pp64s6n8q8w3kg48nd7zdcx2208y4svr5fpfms5lkyzg7z1m"))))
                   (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.")
    (supported-systems '("x86_64-linux"))
    (license license:expat-0)))
6c31c32e3f3c5513e'>graph: Add '%referrer-node-type'.Ludovic Courtès * guix/scripts/graph.scm (ensure-store-items): New procedure. (%reference-node-type)[convert]: Use it. (non-derivation-referrers): New procedure. (%referrer-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("referrer DAG"): New test. * doc/guix.texi (Invoking guix graph): Document it. 2016-05-24graph: Add 'node-reachable-count'.Ludovic Courtès * guix/graph.scm (node-reachable-count): New procedure. * tests/graph.scm ("node-reachable-count"): New test. 2016-04-03build: Add a Guile custom test driver using SRFI-64.Mathieu Lirzin Before that '.log' files for scheme tests were fragmented and not included in test-suite.log. This unifies the semantics of SRFI-64 API with Automake test suite. * build-aux/test-driver.scm: New file. * Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables. (SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables. (AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0. * test-env.in: Silence guix-daemon. * doc/guix.texi (Running the Test Suite): Describe how to display the detailed results. Bug reports require only 'test-suite.log' file. * tests/base32.scm, tests/build-utils.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm, tests/cve.scm, tests/derivations.scm, tests/elpa.scm, tests/file-systems.scm, tests/gem.scm, tests/gexp.scm, tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm, tests/gremlin.scm, tests/hackage.scm, tests/hash.scm, tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm, tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm, tests/profiles.scm, tests/publish.scm, tests/pypi.scm, tests/records.scm, tests/scripts-build.scm, tests/scripts.scm, tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm, tests/store.scm, tests/substitute.scm, tests/syscalls.scm, tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm, tests/utils.scm: Don't exit at the end of test groups. * tests/containers.scm: Likewise. Use 'test-skip' instead of exiting with error code 77. 2016-03-06tests: Disable grafting by default for most tests.Ludovic Courtès This allows tests to run as expected even in the presence of replacements among the bootstrap packages, such as Perl (commit d8173f21f7b4e3cb83541b8fa70621d2b6d4ce1c). * tests/cpan.scm: Add (%graft? #f). * tests/derivations.scm: Likewise. * tests/graph.scm: Likewise. * tests/monads.scm: Likewise. * tests/profiles.scm: Likewise. * tests/gexp.scm: Likewise. ("gexp->derivation vs. grafts"): Explicitly reenable grafting before, and disable it after, using 'set-grafting'. 2016-01-13tests: Use sed instead of grep as a package with no dependencies.Ludovic Courtès * tests/graph.scm ("node-edges"): Choose SED instead of GREP as the example. 2016-01-02graph: %BAG-WITH-ORIGINS-NODE-TYPE includes the origin's guile.Ludovic Courtès Before that it would include #f for most origins since that the default value of 'origin-patch-guile'. * guix/scripts/graph.scm (bag-node-edges): When 'origin-patch-guile' returns #f, use (default-guile). * tests/graph.scm ("bag DAG, including origins"): Check for an edge from O to (default-guile). 2016-01-02graph: %BAG-EMERGED-NODE-TYPE filters out origins.Ludovic Courtès Fixes <http://bugs.gnu.org/22280>. Reported by Leo Famulari <leo@famulari.name>. * guix/scripts/graph.scm (%bag-emerged-node-type)[edges]: Mimic %BAG-NODE-TYPE. This is a followup to 38b92da. 2015-12-13graph: Add synthetic test.Ludovic Courtès * tests/graph.scm ("node-transitive-edges, no duplicates"): New test. 2015-11-23graph: Add '%bag-with-origins-node-type'.Ludovic Courtès * guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call. Add case for 'origin'. (%bag-node-type)[edges]: Add filtering here. (%bag-with-origins-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("bag DAG, including origins"): New test. * tests/guix-graph.sh: Add 'bag-with-origins'. * doc/guix.texi (Invoking guix graph): Document it. 2015-11-21graph: Add procedures to query a node's edges.Ludovic Courtès * guix/graph.scm (%node-edges, node-edges, node-back-edges) (node-transitive-edges): New procedures. * tests/graph.scm ("node-edges") ("node-transitive-edges + node-back-edges"): New tests. 2015-11-21Add (guix graph).Ludovic Courtès * guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it.