feat: add nix flake for reproducible builds#19
Conversation
|
Should we add CI for nix building? (It usually takes longer time). If you want, I can do that :) |
|
Thanks for the PR! This looks great overall — a few things to consider before merging:
Let me know if you have questions on any of these! |
|
Done, and I also installed shell completion for nix build. Now nix users can use shell completion out of the box :) |
arimxyer
left a comment
There was a problem hiding this comment.
Hey @Devin-Yeung, thanks for putting this together — the flake looks solid! Crane is a great choice, and the source filtering, SSL cert wrapping, and shell completions are all well done.
A few suggestions:
-
Pin
determinate-nix-actionto a release tag — Currently@main, which could break or pose a supply-chain risk if the branch moves unexpectedly. They publish av3major tag, soDeterminateSystems/determinate-nix-action@v3would match the pinning convention used in the rest of the CI (actions/checkout@v6, etc.). -
Consider adding a nix cache action — Without caching, every CI run rebuilds from scratch. Something like
DeterminateSystems/magic-nix-cache-actionwould speed things up significantly. -
Optional:
devShelloutput — Not blocking, but adevShellwould let contributorsnix developinto a working environment. Could be a follow-up. -
Optional: concurrency grouping on the workflow — Right now multiple runs can pile up on the same PR. A
concurrencyblock withcancel-in-progress: truewould keep things tidy.
Overall this is in great shape — mainly just the action pinning that I'd want addressed before merging. The rest are nice-to-haves. Thanks again!
I am not familiar with devShell, I use devenv for development. Therefore, I will leave this issue to the community contribution. |
79e58a5 to
f811615
Compare
|
Just sync with main branch. No additional changes :) |
It's seems that there's a test failing so I disable the test in the nix build
But the binary looks fine for me