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
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
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?
1
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
Easy for me to say, but I think there have been some benefits to niv being developed as an external tool. It's pretty great that adopting it doesn't involve large scale changes to what you're doing, and I suspect its separation from nix itself has encouraged it to stay simple.
1
1
Replying to and
It's kept up to date by tools. Niv is the real deal, and I use it as well. But from a docs-aesthetics PoV, it's not nice. ("To accomplish what seems like core functionality, use this third party tool which will generate hundreds of lines of code you should then import.")