Closed pope closed 1 month ago
Hi. This was a shot in the dark to see if this is something you would be interested in leveraging in the Nix part of the codebase. If not, no hard feelings or anything like that.
I also didn't mention that one thing this flake does differently is that it installs treefmt
. With it, you can run nix fmt
or treefmt
from install a shell and then the nix files will get formatted and checked for unused values. There's also a clang format option that can easily be turned on to quickly format all C files in the source too.
Hi! Thanks for the PR. I personally haven't ever used Nix so I don't have much of an opinion on this... The current system is nice for (at least for me) in the way, that it updates the package definition file automatically on new releases and I'd hope to keep it so that there's no manual work required.
Maybe some other Nix users could comment on this too?
Good point about the self-updating package definition. I missed that it was done in a workflow and I added that change. That said, I am not totally sure how to test that flow. I don't want to add something that changes what you're used to - but adds some extra nix things for flake users.
Thanks, looks good to me :)
Flakes are a different way to specify a Nix project/configuration. It provides a few benefits over the existing solution:
m8c
setup.fetchFromGitHub
step because someone could just use/run the app for that tagged branch. Ex:nix run github:laamaa/m8c?ref=v1.7.7
That said, this PR does rely on flake-compat to provide backward compatibility with
default.nix
andshell.nix
. So a user could usenix-shell
as before, or they could usenix develop
(and potentially devenv in the future).