-
Notifications
You must be signed in to change notification settings - Fork 0
Introduce nix flake #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce nix flake #116
Conversation
041e622 to
28354a4
Compare
|
/gemini review |
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a Nix flake to manage the project's dependencies and build environment, which is a great improvement for ensuring reproducibility. The implementation is solid, but I've found a few issues that need addressing. There's a critical issue in the flake.nix patchPhase that will break the build, and a high-severity logic error in the justfile helper script for updating submodules. I've also noted that a required Rust flag (tokio_unstable) seems to be missing from the new Nix environment, and there's a minor code duplication in flake.nix that could be refactored for better maintainability. Overall, great work on moving to Nix, and with these fixes, it should be ready to merge.
@gemini-code-assist, please create comments and suggestions, those are missing from your review. |
|
Hello @pavadeli, Thank you for reaching out and clarifying your request. My apologies for the initial high-level summary. You are absolutely right; a detailed review with specific comments and code suggestions is much more helpful. I've now gone through the pull request with a fine-tooth comb, focusing on the issues I highlighted previously, and have provided actionable feedback below. EDIT @pavadeli : I've removed incorrect suggestions, the rest is for @untio11 to consider. Detailed Code ReviewHere's a breakdown of the issues identified, along with their severity and suggested solutions:
1. Critical: Incorrect
|
8a8b34e to
2eda5ca
Compare
|
Clippy check is failing on Ideally, I'd have github actions use the toolchain from the flake. There's this action that basically loads the flake devshell. See the Why section for relevant rust examples. Edit: indeed, after updating the rust version to 1.89.0 (via |
Nix flake doesnt like the googleapis submodule.
Fetching google apis repo and substituting path in build script
This way, nix builds against the same commit of the googleapis repo as when you build locally with cargo. Use the new just-command to update the submodule and flake input simultaneously
pavadeli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This flake captures the external dependencies for this project (rust toolchain, additional cargo packages) in addition to providing build instructions to build this package through the nix package manager.
An example of using this flake as an input to another one:
Or running
firestore-emulatordirectly from the flake: