[Guix packaging] larsbrinkhoff/forth-mode #44

Closed
opened 2026-08-14 13:16:37 +00:00 by htayj · 2 comments
htayj commented 2026-08-14 13:16:37 +00:00 (Migrated from github.com)

Candidate

  • Upstream canonical URL: https://github.com/larsbrinkhoff/forth-mode
  • Source pinned commit/release when known: 4450a3a5629b579f5d2045d0d8aec84193e9a31f (default-branch snapshot checked 2026-08-14)
  • Target concrete installed deliverable: forth-mode Emacs major mode and tools
  • Primary category: editor-extension
  • Tags: emacs, text-editor
  • Primary language normalized: Elisp
  • Build system: emacs-build-system
  • SPDX expression: GPL-3.0-only
  • License status: confirmed-free
  • License evidence: The upstream LICENSE/COPYING was previously inspected at the pinned snapshot and identifies GPL-3.0-only.
  • Difficulty: moderate — Tests pin an obsolete Gforth version and must be adapted to packaged Gforth.
  • Workflow state: research
  • Existing Guix coverage: Checked 2026-08-14: GNU Guix, Nonguix, Guix Science, Guix HPC, Guix Past, Guix 'R Us, and RDE; no equivalent package with the same upstream origin was found.

Scope and blockers

Install the Emacs mode and its backend files.

Acceptance checks

  • guix lint -L. <package-name> and guix build -L. <package-name> pass once a package definition exists.
  • Byte-compile in batch Emacs and run ERT with packaged Gforth.

Imported from GitHub issue/PR. Originally posted by htayj on 2026-08-14T13:16:37Z.

## Candidate - Upstream canonical URL: https://github.com/larsbrinkhoff/forth-mode - Source pinned commit/release when known: `4450a3a5629b579f5d2045d0d8aec84193e9a31f` (default-branch snapshot checked 2026-08-14) - Target concrete installed deliverable: forth-mode Emacs major mode and tools - Primary category: editor-extension - Tags: emacs, text-editor - Primary language normalized: Elisp - Build system: emacs-build-system - SPDX expression: GPL-3.0-only - License status: confirmed-free - License evidence: The upstream LICENSE/COPYING was previously inspected at the pinned snapshot and identifies GPL-3.0-only. - Difficulty: moderate — Tests pin an obsolete Gforth version and must be adapted to packaged Gforth. - Workflow state: research - Existing Guix coverage: Checked 2026-08-14: GNU Guix, Nonguix, Guix Science, Guix HPC, Guix Past, Guix 'R Us, and RDE; no equivalent package with the same upstream origin was found. ## Scope and blockers Install the Emacs mode and its backend files. ## Acceptance checks - `guix lint -L. <package-name>` and `guix build -L. <package-name>` pass once a package definition exists. - Byte-compile in batch Emacs and run ERT with packaged Gforth. --- Imported from [GitHub issue/PR](https://github.com/htayj/guix-channel/issues/44). Originally posted by [htayj](https://github.com/htayj) on 2026-08-14T13:16:37Z.
htayj commented 2026-08-25 13:31:42 +00:00 (Migrated from github.com)

Goocastle recorded disposition: implementation-ready.

Created implementation ticket: #607.

Canonical source and fixed revision: use https://github.com/larsbrinkhoff/forth-mode at commit 4450a3a5629b579f5d2045d0d8aec84193e9a31f. GitHub identifies that commit as the 0.3 release bump (there is no 0.3 tag), and the upstream forth-mode.el header declares Version: 0.3. The local channel already records the codeload source as larsbrinkhoff-forth-mode-source with Guix Nix-base32 hash 0w0amqi1hrmfz99h0fbyr4mypl3jy3aky8jhpiydp794j21ld71n; use its channel version 0-4450a3a and source rather than an unpinned fetch. The source is pure Elisp plus one SwiftForth .fth helper, has no native compilation, and is directly suitable for emacs-build-system. LICENSE is the standard GPL version 3 text and GitHub reports GPL-3.0; use license:gpl3 (SPDX GPL-3.0-only). No non-free or unlicensed bundled dependency was found. Equivalent coverage exists and must be accounted for: authoritative Guix defines emacs-forth-mode@0.2 in gnu/packages/emacs-xyz.scm from the same project homepage but an older NonGNU ELPA 0.2 archive with tests disabled; current NonGNU ELPA publishes forth-mode 0.3, whose installed files match the common files in this pinned commit. The workspace channel has only the larsbrinkhoff-forth-mode-source preservation package and no built mode package. Therefore add/update the emacs-forth-mode identity in tay/packages/forth-mode.scm from the pinned source, intentionally replacing/overriding the older 0.2 package when this channel package is selected rather than inventing a different upstream package identity. Import guix build-system emacs, guix gexp, guix packages, gnu packages forth, and tay packages larsbrinkhoff-a-f; set build-system to emacs-build-system, reuse package-source/package-version from larsbrinkhoff-forth-mode-source, and add (inputs (list gforth)) because run-forth starts Gforth at runtime and the ERT completion test starts the same process. cl-lib, comint, smie, url, and Gnus mm-url are Emacs libraries, so no separate Elisp input is required and Emacs is supplied automatically by emacs-build-system. The default include set installs top-level .el files but omits nested backends; extend it with ^backend/.$ so forth-mode.el, forth-block-mode.el, forth-interaction-mode.el, forth-parse.el, forth-smie.el, forth-spec.el, forth-syntax.el, all backend .el files, and backend/swiftforth.fth are installed. Exclude the build helper build.el and the test-generated autoloads.el from the installed payload while retaining Guix-generated package autoloads. In an unpack phase use emacs-substitute-variables on forth-interaction-mode.el to set the default forth-executable to search-input-file inputs /bin/gforth. This is the required runtime behavior: no shell wrapper is needed because run-forth calls make-comint-in-buffer with that absolute store path; the Gforth backend is then dynamically loaded from the installed backend directory and sends its existing ' drop is Attr! initialization probe. Adapt the obsolete Makefile test pin without changing upstream files: before check, mark only the ERT test forth-spec-parsing as skipped because it calls url-retrieve-synchronously against the live forth-standard.org/lars.nocrew.org indexes and cannot be part of an offline Guix build; retain all other ERT tests. Set HOME to the build TMPDIR and run the test command as make check FORTH=<the exact /bin/gforth input path>, which exercises build.el batch byte-compilation and ERT, including forth-completion-at-point's Gforth assertion that completion of 2c yields 2Constant. Specific acceptance proof: run guix lint -L. emacs-forth-mode and guix build -L. emacs-forth-mode; in a network-disabled temporary environment, keep the unpacked source's test/.fth fixtures as the fixture working directory while -L points to the installed output directory share/emacs/site-lisp/forth-mode-0-4450a3a, require forth-mode, forth-block-mode, and forth-interaction-mode, visit test/noblock.fth, test/block1.fth, and test/block2.fth to assert forth-mode and the expected block-mode state, require the Gforth backend through an actual run-forth process, and assert the process is killed cleanly. These checks establish the requested mode/backend installation and packaged-Gforth runtime behavior without claiming those package proofs have already run.


Imported from GitHub comment. Originally posted by htayj on 2026-08-25T13:31:42Z.

<!-- goocastle-disposition:sequential-reviewer:44:1:implementation-ready --> Goocastle recorded disposition: implementation-ready. Created implementation ticket: #607. Canonical source and fixed revision: use https://github.com/larsbrinkhoff/forth-mode at commit 4450a3a5629b579f5d2045d0d8aec84193e9a31f. GitHub identifies that commit as the 0.3 release bump (there is no 0.3 tag), and the upstream forth-mode.el header declares Version: 0.3. The local channel already records the codeload source as larsbrinkhoff-forth-mode-source with Guix Nix-base32 hash 0w0amqi1hrmfz99h0fbyr4mypl3jy3aky8jhpiydp794j21ld71n; use its channel version 0-4450a3a and source rather than an unpinned fetch. The source is pure Elisp plus one SwiftForth .fth helper, has no native compilation, and is directly suitable for emacs-build-system. LICENSE is the standard GPL version 3 text and GitHub reports GPL-3.0; use license:gpl3 (SPDX GPL-3.0-only). No non-free or unlicensed bundled dependency was found. Equivalent coverage exists and must be accounted for: authoritative Guix defines emacs-forth-mode@0.2 in gnu/packages/emacs-xyz.scm from the same project homepage but an older NonGNU ELPA 0.2 archive with tests disabled; current NonGNU ELPA publishes forth-mode 0.3, whose installed files match the common files in this pinned commit. The workspace channel has only the larsbrinkhoff-forth-mode-source preservation package and no built mode package. Therefore add/update the emacs-forth-mode identity in tay/packages/forth-mode.scm from the pinned source, intentionally replacing/overriding the older 0.2 package when this channel package is selected rather than inventing a different upstream package identity. Import guix build-system emacs, guix gexp, guix packages, gnu packages forth, and tay packages larsbrinkhoff-a-f; set build-system to emacs-build-system, reuse package-source/package-version from larsbrinkhoff-forth-mode-source, and add (inputs (list gforth)) because run-forth starts Gforth at runtime and the ERT completion test starts the same process. cl-lib, comint, smie, url, and Gnus mm-url are Emacs libraries, so no separate Elisp input is required and Emacs is supplied automatically by emacs-build-system. The default include set installs top-level .el files but omits nested backends; extend it with ^backend/.*$ so forth-mode.el, forth-block-mode.el, forth-interaction-mode.el, forth-parse.el, forth-smie.el, forth-spec.el, forth-syntax.el, all backend .el files, and backend/swiftforth.fth are installed. Exclude the build helper build.el and the test-generated autoloads.el from the installed payload while retaining Guix-generated package autoloads. In an unpack phase use emacs-substitute-variables on forth-interaction-mode.el to set the default forth-executable to search-input-file inputs /bin/gforth. This is the required runtime behavior: no shell wrapper is needed because run-forth calls make-comint-in-buffer with that absolute store path; the Gforth backend is then dynamically loaded from the installed backend directory and sends its existing ' drop is Attr! initialization probe. Adapt the obsolete Makefile test pin without changing upstream files: before check, mark only the ERT test forth-spec-parsing as skipped because it calls url-retrieve-synchronously against the live forth-standard.org/lars.nocrew.org indexes and cannot be part of an offline Guix build; retain all other ERT tests. Set HOME to the build TMPDIR and run the test command as make check FORTH=<the exact /bin/gforth input path>, which exercises build.el batch byte-compilation and ERT, including forth-completion-at-point's Gforth assertion that completion of 2c yields 2Constant. Specific acceptance proof: run guix lint -L. emacs-forth-mode and guix build -L. emacs-forth-mode; in a network-disabled temporary environment, keep the unpacked source's test/*.fth fixtures as the fixture working directory while -L points to the installed output directory share/emacs/site-lisp/forth-mode-0-4450a3a, require forth-mode, forth-block-mode, and forth-interaction-mode, visit test/noblock.fth, test/block1.fth, and test/block2.fth to assert forth-mode and the expected block-mode state, require the Gforth backend through an actual run-forth process, and assert the process is killed cleanly. These checks establish the requested mode/backend installation and packaged-Gforth runtime behavior without claiming those package proofs have already run. --- Imported from [GitHub comment](https://github.com/htayj/guix-channel/issues/44#issuecomment-5411134029). Originally posted by [htayj](https://github.com/htayj) on 2026-08-25T13:31:42Z.
Owner

Published signed Guix-authenticated commit89b080eeae31da557e0909666a711f1e8600ee75. Explicit channel module (@ (tay packages forth-mode) emacs-forth-mode) selects requested4450a3a, unlike bare name Guix0.3. Main pinned source build/--check/offline lint and integrated runtime passed output /gnu/store/7hnk17qizcvsshhywi5am3h7dr3fy2sa-emacs-forth-mode-0-4450a3a. ERT27 expected of28 including compilation,1network lookup skip,0unexpected; second suite26of27expected1skip. Actual isolated editing insertion/indent/fontfaces/navigation/Imenu, real Gforth square7=49 and completion2c->2Constant verified; graceful bye exit0 replaces prior cleanup SIGHUP. PNG44 actual edited Forth buffer inspected. Existing bytecompile/load-path warnings disclosed. No profile changes or Goocastle execution.

Published signed Guix-authenticated commit89b080eeae31da557e0909666a711f1e8600ee75. Explicit channel module (@ (tay packages forth-mode) emacs-forth-mode) selects requested4450a3a, unlike bare name Guix0.3. Main pinned source build/--check/offline lint and integrated runtime passed output /gnu/store/7hnk17qizcvsshhywi5am3h7dr3fy2sa-emacs-forth-mode-0-4450a3a. ERT27 expected of28 including compilation,1network lookup skip,0unexpected; second suite26of27expected1skip. Actual isolated editing insertion/indent/fontfaces/navigation/Imenu, real Gforth square7=49 and completion2c->2Constant verified; graceful bye exit0 replaces prior cleanup SIGHUP. PNG44 actual edited Forth buffer inspected. Existing bytecompile/load-path warnings disclosed. No profile changes or Goocastle execution.
tay closed this issue 2026-09-30 21:10:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tay/guix-channel#44
No description provided.