-
Notifications
You must be signed in to change notification settings - Fork 183
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
feat: add nix flake #561
feat: add nix flake #561
Conversation
7466959
to
1f0dad9
Compare
rebased onto latest master. i've also made a few random changes, but the only really important one is the adoption of naersk for building the package over nixpkgs |
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.
this could do with some improvement, i think that flake-ifying everything makes the most sense rather than sticking with default.nix schema. default.nix schema would make sense if the build system was more complex, but right now we just need an input like crane for rust and another one for node and it would be up an running. if backwards compatibility is necessary, then you can use flake-compat. other than that, everything else seems good :3
everything is in a flake currently. the
we have naersk already
as this project uses pnpm, there isn't really an input for it. instead, i've used an in-house method (that is also used by a few other packages in nixpkgs) as shown here. minus the verbosity, it offers basically the same features as something like
it is running fine currently. the only issue right now is with the app itself, where i've noticed extremely long build times and/or OOM triggers when builds don't have a cache (see this workflow for example of an uncached build taking extremely long). if your machine can build it though, it works :)
im fine adding this if people want it, i just rarely ever use it personally lol |
f510ba4
to
c1345bc
Compare
@getchoo ah yeah this looks much better now, i think when i previously reviewed this the nix sub directory confused me but now this makes sense. maybe we could streamline this process using a js script that builds everything the way we want it, instead of specifying the configuration for tauri etc. in the |
there isn't much in |
like the title says, this adds a nix flake which includes a dev shell and packages for both macos and linux! this should provide an easy way to install the app on both platforms, a stable interface for reproducible builds across the board, and easier onboarding for contributing through simple development environments. i've tested it on both systems and it works great :)
part of #497. the expression i based this on can be found here in
pkgs/modrinth-app