Implement researched Guix package outcome for #454: [Guix packaging] NetHack Fourk #708

Open
opened 2026-09-11 11:29:34 +00:00 by htayj · 2 comments
htayj commented 2026-09-11 11:29:34 +00:00 (Migrated from github.com)

Context

This delivery ticket was created from research issue #454 ([Guix packaging] NetHack Fourk).

The host-validated research finding follows:

Package the console-only NetHack Fourk variant as Guix package nhfourk in tay/packages/nhfourk.scm. Canonical maintained upstream is https://github.com/tsadok/nhfourk; use the latest stable release tag v4.3.0.4 at immutable commit b8d1029efb9225638b6cb0041e2187a74dabf4c0, not the newer untagged master tip 479383a1d05d54b2dfda5cfaab4ca5147aefa7e5. The GitHub v4.3.0.4 source archive has SHA-256 f12109456daea57d92fb2194a1401eb109969be21c44c6accd9c5f968befa12f and contains no .gitmodules or separately fetched origin. Upstream README, COPYING, and copyright at that revision establish NGPL for the game, data, documentation, console text tiles, maps, and fonts; libuncursed and libnethack_client permit NGPL or GPL-2+; bundled libjansson is Expat; savemap.pl is Expat; aimake is GPL-3+ build-only; aimake.rules is NGPL. Optional raster assets have explicit CC-BY-3.0, CC-BY-SA-3.0, RLTiles-attribution, or geoduck terms, but exclude them by building with --without=gui; do not install SDL2/libpng GUI, server/PostgreSQL/inetd, optional raster tiles, or any runtime-downloaded content. Install the upstream libnethack/dat/license, COPYING, and copyright as license/notice files, with copyright-details covering the shipped closure. Build offline from the release archive with the upstream Perl aimake system in an out-of-source Guix phase, selecting --without=gui and --without=server and the bundled Jansson; expected native inputs are perl, bison, flex, and the C/C++ toolchain, with zlib as the library input. The checked-in testbench exists but is not wired as a default aimake test target; run any directly buildable testbench target if exposed, otherwise retain the package smoke test as the deterministic acceptance test. Install the real console binary under libexec and a Guix launcher as /bin/nhfourk. Normal launches must copy/link immutable data into ${XDG_STATE_HOME:-$HOME/.local/state}/nhfourk and invoke the real binary with -H there, so saves, scores, locks, and dumps never target the store; the --guix-smoke wrapper mode must instead use a fresh mktemp directory, a fixed TERM/size, a PTY helper, and no network. That mode should launch a real local new game with fixed -u/-p/-r selections, make a movement, save, return to the menu, load the save, assert the save artifact stayed in the isolated directory and the store is unchanged, and print the single-line marker nhfourk isolated smoke passed; capture the resulting PTY screen at .goocastle/evidence/issue-454.png. No equivalent nhfourk package or same-upstream delivery exists in the local channel; acehack, dhack, dnethack, grunthack, hack, and hackem are distinct projects. Acceptance is guix lint -L . nhfourk clean, guix build -L . --no-grafts nhfourk offline, upstream checks where available, and guix build -L . --no-grafts --check nhfourk plus the fresh-HOME/XDG wrapper smoke with no store writes.

Acceptance criteria

  • Implement the viable package change identified in the host-validated research finding.
  • Preserve Guix source provenance, licensing, and deterministic build requirements recorded in the finding.
  • Add and pass a package-specific safe smoke proof using isolated HOME/XDG state before closure.

Runtime evidence contract

Implementation workflow: guix-package-quality-gates
Reviewed contract file: .goocastle/runtime-evidence-contracts.json
Required proof phase: safe-package-proof; screenshot phase: runtime-screenshot
Evidence adapter: github-issue-comment
Copy this reviewed contract into the named file before running the package proof workflow.

{
  "version": 1,
  "contracts": [
    {
      "issueNumber": 708,
      "packageName": "nhfourk",
      "packageModulePath": "tay/packages/nhfourk.scm",
      "artifactPath": ".goocastle/evidence/issue-708.png",
      "runtime": {
        "executable": "nhfourk",
        "invocation": {
          "file": "nhfourk",
          "args": [
            "--guix-smoke"
          ]
        },
        "successMarker": "nhfourk isolated smoke passed"
      }
    }
  ]
}

Imported from GitHub issue/PR. Originally posted by htayj on 2026-09-11T11:29:34Z.

<!-- goocastle-implementation-ticket:sequential-reviewer:454:1:implementation-ready --> ## Context This delivery ticket was created from research issue #454 ([Guix packaging] NetHack Fourk). The host-validated research finding follows: Package the console-only NetHack Fourk variant as Guix package nhfourk in tay/packages/nhfourk.scm. Canonical maintained upstream is https://github.com/tsadok/nhfourk; use the latest stable release tag v4.3.0.4 at immutable commit b8d1029efb9225638b6cb0041e2187a74dabf4c0, not the newer untagged master tip 479383a1d05d54b2dfda5cfaab4ca5147aefa7e5. The GitHub v4.3.0.4 source archive has SHA-256 f12109456daea57d92fb2194a1401eb109969be21c44c6accd9c5f968befa12f and contains no .gitmodules or separately fetched origin. Upstream README, COPYING, and copyright at that revision establish NGPL for the game, data, documentation, console text tiles, maps, and fonts; libuncursed and libnethack_client permit NGPL or GPL-2+; bundled libjansson is Expat; savemap.pl is Expat; aimake is GPL-3+ build-only; aimake.rules is NGPL. Optional raster assets have explicit CC-BY-3.0, CC-BY-SA-3.0, RLTiles-attribution, or geoduck terms, but exclude them by building with --without=gui; do not install SDL2/libpng GUI, server/PostgreSQL/inetd, optional raster tiles, or any runtime-downloaded content. Install the upstream libnethack/dat/license, COPYING, and copyright as license/notice files, with copyright-details covering the shipped closure. Build offline from the release archive with the upstream Perl aimake system in an out-of-source Guix phase, selecting --without=gui and --without=server and the bundled Jansson; expected native inputs are perl, bison, flex, and the C/C++ toolchain, with zlib as the library input. The checked-in testbench exists but is not wired as a default aimake test target; run any directly buildable testbench target if exposed, otherwise retain the package smoke test as the deterministic acceptance test. Install the real console binary under libexec and a Guix launcher as /bin/nhfourk. Normal launches must copy/link immutable data into ${XDG_STATE_HOME:-$HOME/.local/state}/nhfourk and invoke the real binary with -H there, so saves, scores, locks, and dumps never target the store; the --guix-smoke wrapper mode must instead use a fresh mktemp directory, a fixed TERM/size, a PTY helper, and no network. That mode should launch a real local new game with fixed -u/-p/-r selections, make a movement, save, return to the menu, load the save, assert the save artifact stayed in the isolated directory and the store is unchanged, and print the single-line marker nhfourk isolated smoke passed; capture the resulting PTY screen at .goocastle/evidence/issue-454.png. No equivalent nhfourk package or same-upstream delivery exists in the local channel; acehack, dhack, dnethack, grunthack, hack, and hackem are distinct projects. Acceptance is guix lint -L . nhfourk clean, guix build -L . --no-grafts nhfourk offline, upstream checks where available, and guix build -L . --no-grafts --check nhfourk plus the fresh-HOME/XDG wrapper smoke with no store writes. ## Acceptance criteria - Implement the viable package change identified in the host-validated research finding. - Preserve Guix source provenance, licensing, and deterministic build requirements recorded in the finding. - Add and pass a package-specific safe smoke proof using isolated HOME/XDG state before closure. <!-- goocastle-runtime-evidence-contract --> ## Runtime evidence contract Implementation workflow: `guix-package-quality-gates` Reviewed contract file: `.goocastle/runtime-evidence-contracts.json` Required proof phase: `safe-package-proof`; screenshot phase: `runtime-screenshot` Evidence adapter: `github-issue-comment` Copy this reviewed contract into the named file before running the package proof workflow. ```json { "version": 1, "contracts": [ { "issueNumber": 708, "packageName": "nhfourk", "packageModulePath": "tay/packages/nhfourk.scm", "artifactPath": ".goocastle/evidence/issue-708.png", "runtime": { "executable": "nhfourk", "invocation": { "file": "nhfourk", "args": [ "--guix-smoke" ] }, "successMarker": "nhfourk isolated smoke passed" } } ] } ``` <!-- goocastle-runtime-evidence-contract-end --> --- Imported from [GitHub issue/PR](https://github.com/htayj/guix-channel/issues/708). Originally posted by [htayj](https://github.com/htayj) on 2026-09-11T11:29:34Z.
htayj commented 2026-09-11 13:01:16 +00:00 (Migrated from github.com)

Goocastle blocked this ticket after the bounded repair budget was exhausted for the required command gate.
The failure receipt and task branch provenance remain preserved; inspect the branch and repair the failing gate before retrying.

Bounded failure evidence:
Failed command: node /opt/goocastle/bin/guix-package-proof.mjs '--package-name' nhfourk '--module-path' tay/packages/nhfourk.scm '--runtime-json' '{"executable":"nhfourk","invocation":{"file":"nhfourk","args":["--guix-smoke"]},"successMarker":"nhfourk isolated smoke passed"}'
Exit status: 1
Final failure lines:
[stderr] nhfourk smoke: first game failed
[stdout] tay/packages/nhfourk.scm:290:0: nhfourk@4.3.0.4: line 290 is way too long (207 characters)
[stderr] node exited with code [REDACTED]
[earlier or oversized output omitted]


Imported from GitHub comment. Originally posted by htayj on 2026-09-11T13:01:16Z.

<!-- goocastle-repair-blocked:708:safe-package-proof --> Goocastle blocked this ticket after the bounded repair budget was exhausted for the required command gate. The failure receipt and task branch provenance remain preserved; inspect the branch and repair the failing gate before retrying. Bounded failure evidence: Failed command: node /opt/goocastle/bin/guix-package-proof.mjs '--package-name' nhfourk '--module-path' tay/packages/nhfourk.scm '--runtime-json' '{"executable":"nhfourk","invocation":{"file":"nhfourk","args":["--guix-smoke"]},"successMarker":"nhfourk isolated smoke passed"}' Exit status: 1 Final failure lines: [stderr] nhfourk smoke: first game failed [stdout] tay/packages/nhfourk.scm:290:0: nhfourk@4.3.0.4: line 290 is way too long (207 characters) [stderr] node exited with code [REDACTED] [earlier or oversized output omitted] --- Imported from [GitHub comment](https://github.com/htayj/guix-channel/issues/708#issuecomment-5634804215). Originally posted by [htayj](https://github.com/htayj) on 2026-09-11T13:01:16Z.
Owner

Blocked by explicit user decision: keep full-original Fourk packaging open pending a clear free-software grant for default Geoduck assets. Pinned source geoduck.map permits unmodified redistribution and personal Jonadab modifications, not general modification rights. Canonical http://www.geoduckthings.net/nhack/nhack.html (updated2026-04-13, retrieved2026-10-01) likewise grants credited redistribution only. No asset silently removed/replaced, no FSDG compatibility claimed. Dedicated recipe/helpers remain unpublished and unverified; no build/runtime or closure. Resume requires broader primary-source licensing permission or a new user-approved asset disposition.

Blocked by explicit user decision: keep full-original Fourk packaging open pending a clear free-software grant for default Geoduck assets. Pinned source geoduck.map permits unmodified redistribution and personal Jonadab modifications, not general modification rights. Canonical http://www.geoduckthings.net/nhack/nhack.html (updated2026-04-13, retrieved2026-10-01) likewise grants credited redistribution only. No asset silently removed/replaced, no FSDG compatibility claimed. Dedicated recipe/helpers remain unpublished and unverified; no build/runtime or closure. Resume requires broader primary-source licensing permission or a new user-approved asset disposition.
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#708
No description provided.