add nix flake - #216
Conversation
12d571f to
85f5b62
Compare
|
🌐 Preview URL: https://pr-216.frcsoftware.pages.dev |
|
Lgtm, but I don't know enough about nix flakes to be a definitive approval. @spacey-sooty, could you review? |
|
Small nit, broadly LGTM though I'm no flake expert I always used nix-shell @nullcubee wanna give this a look? |
|
So with #217 pnpm is getting bumped to |
|
If this is going to be a common issue do we think it's worth just doing an override and making it part of the version update process? |
|
overriding the pnpm source? |
|
we should just be able to override the version it downloads right? |
f01e37a to
cb4c229
Compare
| description = "A flake to provide a dev environment for FRC/FTC Software development"; | ||
|
|
||
| inputs = { | ||
| nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; |
There was a problem hiding this comment.
| nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; | |
| nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable"; |
nit: If you're not using any nixos features, you can just use nixpkgs-unstable for more up-to-date packages when you do update the flake.
|
So, similarly to my other comment here, most of the contribution documentation just says to use the latest versions of the dependencies for your OS (or notes a specific version or later), if this is true then I'm not sure how much point there is in pinning pnpm to the specific version marked in the project...? Although pnpm doesn't really take any time to build so idk how much of an issue it really is. Also, the fact that the nix flake exists and can be used to install the dependencies should be noted in the README/Contributing guide. This could be done in a separate PR however. |
Description
Add a nix flake that provides a dev-shell for development. This makes it so that someone doing development on nixos or who is using nix as their packages manager doesn't have to keep their own copy of this flake or some other Dev shell.
Meta
currently the flake uses the wrong version of pnpm(10.34.5 rather than 10.16.0) because, nixpkgs only contains the most up to date pnpm for each major version. These are the options that i have thought of
One other question that i have whether i should add formatting for the flake in ci or any of the documentation, my logic for not was that these files dont get edited often and to format them requires a nix installation witch would be a pain in ci and also impossible for anyone on windows as nix doesn't support it.
Merge checklist: