-
-
Notifications
You must be signed in to change notification settings - Fork 301
Add nix flake #1119
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
base: main
Are you sure you want to change the base?
Add nix flake #1119
Conversation
to make it easy to create development environments that are reproducible
WalkthroughA new Nix flake configuration file is added at the project root, defining development environment inputs and per-system outputs. The devShell includes Go 1.24, Node.js 22, pnpm, TypeScript, golangci-lint, and various build tools with environment variables configured for compilation. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
flake.nix (1)
44-47: Consider whether these environment variables are necessary.Setting
GO,GOROOT,CFLAGS, andLDFLAGSmanually is often unnecessary when using Nix, as the build environment typically handles these automatically. These explicit settings might cause conflicts or unexpected behavior.If you encounter issues without these variables, they can remain. Otherwise, consider simplifying to:
pkgs.mkShell { buildInputs = [ # generic go-task # frontend nodejs_22 pnpm nodePackages.typescript nodePackages.typescript-language-server # backend go glibc.static gofumpt golangci-lint sqlite go-swag gcc libwebp libavif libheif libjxl ]; - CFLAGS = "-I${pkgs.glibc.dev}/include"; - LDFLAGS = "-L${pkgs.glibc}/lib"; - GO = "${go}/bin/go"; - GOROOT = "${go}/share/go"; };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
flake.nix(1 hunks)
🔇 Additional comments (1)
flake.nix (1)
21-43: LGTM! Comprehensive dependency list.The buildInputs cover all necessary tools for a full-stack development environment with Go backend, Node.js frontend, and image processing capabilities. The inclusion of both development tools (golangci-lint, gofumpt) and runtime libraries is appropriate.
|
☝️ ?!? well |
to make it easy to create development environments that are reproducible
What type of PR is this?
What this PR does / why we need it:
this project has a lot of dependencies to be compiled correctly ... and if you want to run it outside of docker it's hard to build it for that.
Which issue(s) this PR fixes:
none instead of creating an issue first i created this pull so actuall discustion can happen alongide the code
Special notes for your reviewer:
well if you don't use nix the files do not interfere with the rest at all
Testing
install nix and do:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.