Skip to content

Feat: Add a Nix flake for reproducible development environments#345

Merged
AlexanderHarrison merged 5 commits into
AlexanderHarrison:masterfrom
MadeInShineA:feat/nix-integration
Jul 18, 2026
Merged

Feat: Add a Nix flake for reproducible development environments#345
AlexanderHarrison merged 5 commits into
AlexanderHarrison:masterfrom
MadeInShineA:feat/nix-integration

Conversation

@MadeInShineA

@MadeInShineA MadeInShineA commented Jun 27, 2026

Copy link
Copy Markdown

Feat: Add a Nix flake for reproducible development environments

Why this PR?

Setting up the local development environment currently requires manually installing several dependencies (DevKitPro, xdelta3, and the GameCube/Wii toolchain). On NixOS these aren't easily available at all.

This PR adds a Nix flake that provides a fully reproducible dev shell with all required dependencies pre-configured for users using the Nix package manager.

What this PR does

This PR introduces 3 new files:

  • flake.nix / flake.lock which defines the dev shell with the devkitNix overlay (for stdenvPPC and the PPC toolchain), xdelta, patchelf, and file
  • .envrc allows auto-entering the shell via nix-direnv on cd
  • DEVELOPMENT.md instructions for NixOS users

The shellHook automatically:

  • Creates .nix-bin/ symlinks so the tools are on PATH regardless of their install location
  • Exports $gc_fst, $hgecko, $hmex, $xdelta variables for build.sh
  • Patches the bundled Linux binaries in bin/ for NixOS compatibility (via patchelf)

The .gitignore was updated to ignore the generated .direnv/, .nix-bin/, and bin/*.orig files.

How to use

# With Nix installed and flakes enabled:
nix develop

# Or with direnv + nix-direnv to enter the dev shell on directory entry:
direnv allow  # only needed once

@MadeInShineA MadeInShineA changed the title feat: Add nix integration Feat: Add a Nix flake for reproducible development environments Jun 27, 2026
@MadeInShineA

Copy link
Copy Markdown
Author

Let's get this moving

Add a Nix flake providing the dev shell with:
- devkitNix overlay for the PPC toolchain (stdenvPPC)
- xdelta, patchelf, file as build inputs
- ShellHook that links tools into PATH, exports variables,
  and patches bundled binaries for NixOS compatibility
- .envrc for automatic shell entry via direnv
- .gitignore entries for .direnv/, .nix-bin/, bin/*.orig
- DEVELOPMENT.md instructions for NixOS users
@MadeInShineA
MadeInShineA force-pushed the feat/nix-integration branch from 8a809b6 to dbf081e Compare July 17, 2026 02:09
Comment thread build.sh
@MadeInShineA

Copy link
Copy Markdown
Author

Should be fine now @AlexanderHarrison ! Sorry

@MadeInShineA

Copy link
Copy Markdown
Author

Ok should be good to go, sorry, I m at the beach hahaha lgtm

@AlexanderHarrison
AlexanderHarrison merged commit 9156a17 into AlexanderHarrison:master Jul 18, 2026
@AlexanderHarrison

Copy link
Copy Markdown
Owner

Looks good, thanks!

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