build(dev): add pinned Nix and nix-direnv environments

This commit is contained in:
0xrsydn 2026-09-23 18:32:49 +07:00
commit dfa39edfa0
7 changed files with 166 additions and 3 deletions

View file

@ -32,7 +32,9 @@ revision changes require Git; ordinary bot changes can continue to use `jj`.
## Build on CachyOS / Linux
Install .NET SDK 9 and the native Linux Steam version of Slay the Spire 2.
Enter the pinned development environment with `direnv allow` (nix-direnv) or
`nix develop`. It includes .NET SDK 9; see [DEVELOPMENT.md](DEVELOPMENT.md).
Install the native Linux Steam version of Slay the Spire 2 separately.
Check that `dotnet --list-sdks` lists a 9.x SDK. Set `GAME_DIR` to the actual Steam
library path; custom libraries and Flatpak Steam use different paths.
@ -45,8 +47,8 @@ dotnet build vendor/STS2MCP/STS2_MCP.csproj -c Release \
-p:STS2GameDir="$GAME_DIR" -o /tmp/sts2-mcp-build
```
If you already use Nix, you can replace `dotnet build` with
`nix shell nixpkgs#dotnet-sdk_9 --command dotnet build`.
Outside the shell, prefix the build command with `nix develop --command`.
This uses the repository lock file rather than your machine's nixpkgs registry.
Build against your installed game assemblies. A successful Mac build does not
prove compatibility with a different Linux game version.