Skip to content

Adding nethack 5.0.0#33219

Draft
tdejager wants to merge 2 commits intoconda-forge:mainfrom
tdejager:nethack
Draft

Adding nethack 5.0.0#33219
tdejager wants to merge 2 commits intoconda-forge:mainfrom
tdejager:nethack

Conversation

@tdejager
Copy link
Copy Markdown
Contributor

@tdejager tdejager commented May 4, 2026

Summary

Adds NetHack 5.0.0, the classic terminal roguelike,
as a new conda-forge package.

  • Builds from the upstream sys/unix hints files (linux.500 / macOS.500)
  • Links against conda-forge lua 5.4.8 and ncurses 6.6 rather than vendoring
  • Skips Windows; the upstream Windows build is MSVC/winhack-driven and would
    need its own recipe pass
  • Installs as $PREFIX/bin/nethack (a small wrapper) plus $PREFIX/share/nethack/
    for game data, matching the conda layout

The build script patches one = to += in compiler.500 so the conda env's
CFLAGS survive, and patches Makefile.src to add -llua to LUALIBS so the
real lua symbols come from $PREFIX/lib. NetHack's makefile still wants a
static liblua.a to satisfy a make dependency; we materialize a tiny stub
archive instead of fetching and building the bundled lua source.

Verified locally on osx-arm64: nethack --version and nethack --showpaths
both work; otool -L shows the binary linking only against
@rpath/libncurses.6.dylib, @rpath/liblua.5.4.dylib, and libSystem.

Checklist

  • Title of this PR is meaningful
  • License file is packaged (dat/license, NGPL)
  • Source is from official source (GitHub release tag)
  • Package does not vendor other packages (lua, ncurses come from conda-forge)
  • Package does not ship static libraries

NetHack is a classic terminal roguelike. The recipe builds with the
upstream linux/macOS hints files; lua 5.4.8 and ncurses come from
conda-forge, with stub static archives standing in for NetHack's
bundled lua build so its makefile dependency resolution still works.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@conda-forge-admin
Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/nethack/recipe.yaml) and found it was in an excellent condition.

Move the compiler.500 CFLAGS-assignment fix and the Makefile.src LUALIBS
change out of build.sh and into source patches applied via the recipe's
source.patches list. Easier to review, easier to maintain, and matches
how upstream-patching is normally done in conda-forge recipes.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants