Implement researched Guix package outcome for #456: [Guix packaging] NitroHack #709

Closed
opened 2026-09-11 13:23:44 +00:00 by htayj · 2 comments
htayj commented 2026-09-11 13:23:44 +00:00 (Migrated from github.com)

Context

This delivery ticket was created from research issue #456 ([Guix packaging] NitroHack).

The host-validated research finding follows:

Implementation-ready delivery brief for new package nitrohack. No same-upstream NitroHack package or reference exists in the local channel; dnethack, grunthack, and other NetHack variants are distinct projects. Canonical upstream is the archived https://github.com/DanielT/NitroHack repository, default branch master, latest immutable tag 4.0.4 at commit 21b9774b24efbdafdd20e152f9b1e5ed2a7b4150 (no GitHub release). Fetch https://github.com/DanielT/NitroHack/archive/21b9774b24efbdafdd20e152f9b1e5ed2a7b4150.tar.gz; observed SHA-256 is 5db7e86e88ef3ac03a10cfe29738e4c45ab24be2ed552ebf8c71d6d11034682d. The fixed tree has no Git submodules or font, tile, sound, or other binary asset origins; code, maps, generated nhdat, and documentation come from this one origin. libnitrohack/dat/license at that revision is the NitroHack/NetHack General Public License, granting copy, modification, source, and redistribution rights with copyleft conditions; dist/debian/copyright records Daniel Thaler and the NetHack Devteam. Install that license plus README, doc/Guidebook.txt, and the Debian copyright/notice. Build metadata is top-level CMake plus libnitrohack/util/CMakeLists.txt: generated parsers require bison and flex; libnitrohack_client links jansson; the curses UI links ncursesw. Use cmake-build-system or equivalent with cmake, gcc-toolchain, bison, flex, jansson, and ncurses inputs; pass -DENABLE_SERVER=OFF to omit the optional PostgreSQL network server and set BINDIR, LIBDIR, DATADIR, and SHELLDIR to store output paths. No upstream test target was found, so set package tests accordingly and rely on the runtime proof. Package module is tay/packages/nitrohack.scm and package name is nitrohack. The README/source show local curses play, configuration/save/log state under XDG_CONFIG_HOME/NitroHack or HOME/.config/NitroHack, and no updater, telemetry, or runtime download; network client/server code exists, so the wrapper smoke must remain local. Wrap the real binary, keep normal argv forwarding, and add exact nitrohack --guix-smoke: use the channel's existing util-linux script/PTY pattern with -@ -u goocastle-smoke to start a fresh local game, perform deterministic movement, save/quit, relaunch, load the save, quit, assert gameplay-title and restored-game text, assert all mutable files stay below fresh XDG/HOME and the store is untouched, then print exactly one stdout line: nitrohack guix smoke passed. Install nhdat, license, README/Guidebook, and copyright notices in the output. This research phase had no Guix daemon, so no build, lint, or reproducibility proof is claimed. Acceptance is guix lint -L . nitrohack; daemon-backed guix build -L . --no-grafts nitrohack and --check; source/license notice checks; and the fresh HOME/XDG smoke with screenshot .goocastle/evidence/issue-456.png.

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": 709,
      "packageName": "nitrohack",
      "packageModulePath": "tay/packages/nitrohack.scm",
      "artifactPath": ".goocastle/evidence/issue-709.png",
      "runtime": {
        "executable": "nitrohack",
        "invocation": {
          "file": "nitrohack",
          "args": [
            "--guix-smoke"
          ]
        },
        "successMarker": "nitrohack guix smoke passed"
      }
    }
  ]
}

Imported from GitHub issue/PR. Originally posted by htayj on 2026-09-11T13:23:44Z.

<!-- goocastle-implementation-ticket:sequential-reviewer:456:1:implementation-ready --> ## Context This delivery ticket was created from research issue #456 ([Guix packaging] NitroHack). The host-validated research finding follows: Implementation-ready delivery brief for new package nitrohack. No same-upstream NitroHack package or reference exists in the local channel; dnethack, grunthack, and other NetHack variants are distinct projects. Canonical upstream is the archived https://github.com/DanielT/NitroHack repository, default branch master, latest immutable tag 4.0.4 at commit 21b9774b24efbdafdd20e152f9b1e5ed2a7b4150 (no GitHub release). Fetch https://github.com/DanielT/NitroHack/archive/21b9774b24efbdafdd20e152f9b1e5ed2a7b4150.tar.gz; observed SHA-256 is 5db7e86e88ef3ac03a10cfe29738e4c45ab24be2ed552ebf8c71d6d11034682d. The fixed tree has no Git submodules or font, tile, sound, or other binary asset origins; code, maps, generated nhdat, and documentation come from this one origin. libnitrohack/dat/license at that revision is the NitroHack/NetHack General Public License, granting copy, modification, source, and redistribution rights with copyleft conditions; dist/debian/copyright records Daniel Thaler and the NetHack Devteam. Install that license plus README, doc/Guidebook.txt, and the Debian copyright/notice. Build metadata is top-level CMake plus libnitrohack/util/CMakeLists.txt: generated parsers require bison and flex; libnitrohack_client links jansson; the curses UI links ncursesw. Use cmake-build-system or equivalent with cmake, gcc-toolchain, bison, flex, jansson, and ncurses inputs; pass -DENABLE_SERVER=OFF to omit the optional PostgreSQL network server and set BINDIR, LIBDIR, DATADIR, and SHELLDIR to store output paths. No upstream test target was found, so set package tests accordingly and rely on the runtime proof. Package module is tay/packages/nitrohack.scm and package name is nitrohack. The README/source show local curses play, configuration/save/log state under XDG_CONFIG_HOME/NitroHack or HOME/.config/NitroHack, and no updater, telemetry, or runtime download; network client/server code exists, so the wrapper smoke must remain local. Wrap the real binary, keep normal argv forwarding, and add exact nitrohack --guix-smoke: use the channel's existing util-linux script/PTY pattern with -@ -u goocastle-smoke to start a fresh local game, perform deterministic movement, save/quit, relaunch, load the save, quit, assert gameplay-title and restored-game text, assert all mutable files stay below fresh XDG/HOME and the store is untouched, then print exactly one stdout line: nitrohack guix smoke passed. Install nhdat, license, README/Guidebook, and copyright notices in the output. This research phase had no Guix daemon, so no build, lint, or reproducibility proof is claimed. Acceptance is guix lint -L . nitrohack; daemon-backed guix build -L . --no-grafts nitrohack and --check; source/license notice checks; and the fresh HOME/XDG smoke with screenshot .goocastle/evidence/issue-456.png. ## 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": 709, "packageName": "nitrohack", "packageModulePath": "tay/packages/nitrohack.scm", "artifactPath": ".goocastle/evidence/issue-709.png", "runtime": { "executable": "nitrohack", "invocation": { "file": "nitrohack", "args": [ "--guix-smoke" ] }, "successMarker": "nitrohack guix smoke passed" } } ] } ``` <!-- goocastle-runtime-evidence-contract-end --> --- Imported from [GitHub issue/PR](https://github.com/htayj/guix-channel/issues/709). Originally posted by [htayj](https://github.com/htayj) on 2026-09-11T13:23:44Z.
htayj commented 2026-09-11 15:07:11 +00:00 (Migrated from github.com)

Goocastle verified runtime evidence.

Runtime screenshot

Runtime receipt
  • Package: nitrohack
  • Safe package proof phase: safe-package-proof
  • Safe package proof argv: ["node","/opt/goocastle/bin/guix-package-proof.mjs","--package-name","nitrohack","--module-path","tay/packages/nitrohack.scm","--runtime-json","{&quot;executable&quot;:&quot;nitrohack&quot;,&quot;invocation&quot;:{&quot;file&quot;:&quot;nitrohack&quot;,&quot;args&quot;:[&quot;--guix-smoke&quot;]},&quot;successMarker&quot;:&quot;nitrohack guix smoke passed&quot;}"]
  • Screenshot phase: runtime-screenshot
  • Screenshot argv: ["sh",".goocastle/capture-guix-package-screenshot.sh"]
  • Runtime executable (Guix store/profile): /gnu/store/dxwm9yr56m353s42llymi8r0zi3bgyrq-nitrohack-4.0.4/bin/nitrohack
  • Runtime invocation: ["/gnu/store/dxwm9yr56m353s42llymi8r0zi3bgyrq-nitrohack-4.0.4/bin/nitrohack","--guix-smoke"]
  • Expected runtime invocation: ["nitrohack","--guix-smoke"]
  • Expected runtime marker: nitrohack guix smoke passed
  • Per-issue runtime contract: .goocastle/runtime-evidence-contracts.json (issue #709, SHA-256 87592d663d82346d36f501a153b7bb600aacbbc2ed6db202df545e170ad824ad)
  • Artifact path: .goocastle/evidence/issue-709.png
  • Artifact SHA-256: 6f8aa18441342f31a7136574e2d0b280be676709312bb0928bb969df56c96115
  • Artifact commit: b11e2d1354f62b8bc268b7865243d6ac45e12643
  • Artifact size/format: 32352 bytes / png

Imported from GitHub comment. Originally posted by htayj on 2026-09-11T15:07:11Z.

<!-- goocastle-runtime-evidence:sequential-reviewer:709:1:6f8aa18441342f31a7136574e2d0b280be676709312bb0928bb969df56c96115 --> Goocastle verified runtime evidence. ![Runtime screenshot](https://github.com/htayj/guix-channel/blob/b11e2d1354f62b8bc268b7865243d6ac45e12643/.goocastle/evidence/issue-709.png?raw=1) <details><summary>Runtime receipt</summary> - Package: <code>nitrohack</code> - Safe package proof phase: <code>safe-package-proof</code> - Safe package proof argv: <code>[&quot;node&quot;,&quot;/opt/goocastle/bin/guix-package-proof.mjs&quot;,&quot;--package-name&quot;,&quot;nitrohack&quot;,&quot;--module-path&quot;,&quot;tay/packages/nitrohack.scm&quot;,&quot;--runtime-json&quot;,&quot;{\&quot;executable\&quot;:\&quot;nitrohack\&quot;,\&quot;invocation\&quot;:{\&quot;file\&quot;:\&quot;nitrohack\&quot;,\&quot;args\&quot;:[\&quot;--guix-smoke\&quot;]},\&quot;successMarker\&quot;:\&quot;nitrohack guix smoke passed\&quot;}&quot;]</code> - Screenshot phase: <code>runtime-screenshot</code> - Screenshot argv: <code>[&quot;sh&quot;,&quot;.goocastle/capture-guix-package-screenshot.sh&quot;]</code> - Runtime executable (Guix store/profile): <code>/gnu/store/dxwm9yr56m353s42llymi8r0zi3bgyrq-nitrohack-4.0.4/bin/nitrohack</code> - Runtime invocation: <code>[&quot;/gnu/store/dxwm9yr56m353s42llymi8r0zi3bgyrq-nitrohack-4.0.4/bin/nitrohack&quot;,&quot;--guix-smoke&quot;]</code> - Expected runtime invocation: <code>[&quot;nitrohack&quot;,&quot;--guix-smoke&quot;]</code> - Expected runtime marker: <code>nitrohack guix smoke passed</code> - Per-issue runtime contract: <code>.goocastle/runtime-evidence-contracts.json (issue #709, SHA-256 87592d663d82346d36f501a153b7bb600aacbbc2ed6db202df545e170ad824ad)</code> - Artifact path: <code>.goocastle/evidence/issue-709.png</code> - Artifact SHA-256: <code>6f8aa18441342f31a7136574e2d0b280be676709312bb0928bb969df56c96115</code> - Artifact commit: <code>b11e2d1354f62b8bc268b7865243d6ac45e12643</code> - Artifact size/format: <code>32352 bytes / png</code> </details> --- Imported from [GitHub comment](https://github.com/htayj/guix-channel/issues/709#issuecomment-5636487931). Originally posted by [htayj](https://github.com/htayj) on 2026-09-11T15:07:11Z.
htayj commented 2026-09-11 15:07:16 +00:00 (Migrated from github.com)

Completed by Goocastle


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

Completed by Goocastle --- Imported from [GitHub comment](https://github.com/htayj/guix-channel/issues/709#issuecomment-5636488863). Originally posted by [htayj](https://github.com/htayj) on 2026-09-11T15:07:16Z.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#709
No description provided.