Skip to content

Support Nix Flakes#17

Merged
dschrempf merged 6 commits into
mainfrom
flake
May 4, 2026
Merged

Support Nix Flakes#17
dschrempf merged 6 commits into
mainfrom
flake

Conversation

@dschrempf

Copy link
Copy Markdown
Owner

No description provided.

dschrempf added 6 commits May 3, 2026 20:54
- New `Magix.BuildMode` module with `ChannelBuild`/`FlakeBuild` constructors
- Add `--nixpkgs-ref` / `MAGIX_NIXPKGS_REF`
- Add `#!nixpkgs` directive parser
- Add universal `FlakeTemplate.nix`
- Write `flake.nix` alongside `default.nix` in Ni Flake mode; dispatch `nix build`
- Test Nix Flake mode

Fix flake build: use pure-eval-compatible paths

`nix build` evaluates Ni Flakes in pure mode, which forbids:
- `builtins.currentSystem` (fixed using `flake-uitls.lib.eachDefaultSystem`)
- access to absolute paths outside the Nix store (fixed by copying the script into the closure)
@dschrempf dschrempf merged commit 34c86a9 into main May 4, 2026
1 check passed
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.

1 participant