Fix nix flake build issues
Wanted to give jetzig a try today, but could not find a working build for nixos. So this is my attempt to fix it.
I noticed the following issues with flake.nix:
- It always uses deps.nix from main, which breaks the build when trying to build for 0.14
- It uses fetchGit without rev, which requires impure evaluation
To fix this, I made the following changes:
- The build will use the deps.nix file from the source tree that is built
- Only fetch jetzig from github if v14 is built. Otherwise it just builds from the current directory.
I also made smaller changes to try to clean up the inputs and the output packages.
With those changes, I can just run `nix shell github:jrammler/jetzig/nix-build-fixes#v14` to start a shell with jetzig.
Note that builds with both zig 0.15.1 as well as master currently fail, so only the v14 build works.
But this seems to be a known issue (#227).
The devshell still starts, but I did not test it any further.
合并状态:已合并 合并于 2025-10-05 关闭于 2025-10-05 2 条评论