I don't understand why most examples of nix flakes use unversioned URLs as inputs.
Conversation
This is a general trend in Nix examples and documentation. I suspect it is because actually pinning things in Nix looks embarrassingly ugly and verbose (at least historically, no idea about flakes).
1
4
Wish it was easier to learn how to version of stuff in nix… saying this as a nix beginner who is very confused and overwhelmed most of the time. 😔
1
2
I see a lot of files with pinned stuff and magic configs and things that seem to be generated by tools, but it's hard to figure out what process people went through to arrive at this stuff! Or whether they use tools to keep the configs up to date or not… 😬
1
I’ve been a happy niv user for a long time now. It puts versions in a json file you can easily read, edit, and copy between projects to increase sharing if so desired.
1
ahh, is it some sort of lockfile sort of thing?
1
Yes, exactly! The niv command line tool has commands to add, update, and modify dependencies in the lock file. I was unreasonably put off at first for some reason, but it won me over. It’s quite well thought out.
1
1
Cool! It would be really neat if something like this could be built in at some point - seems like a handy thing to have. Is niv the thing I see where people have a bunch of autogenerated nix files in their project repos?
Most likely, yes. On the one hand, I agree that it should be available out of the box because it's so useful. On the other hand, nix (the CLI) development is in a bad place with its inability to cut a release. Niv being external has avoided that jam.
1
1
Ahh got it! Yeah that seems tricky. :(
1
Show replies


