|
|
|
|
|
by dmvinson
383 days ago
|
|
Lazy trees is a long awaited change for many, without it flakes are essentially unusable in monorepos. As a one-time Nix user, Flakes definitely don't seem like an ideal solution but the Nix community lets perfect be the enemy of better too often, and it has the largest following of all the solutions out there (niv being another). Given that, I hope lazy-trees and other improvements that make it actually usable get merged into Nix upstream. If the NixOS/Nix maintainers don't like flakes/DetSys (which I think is somewhat valid!), they need to put forward a canonical way of pinning channels, otherwise there's not really an alternative standard for the community to build around. The usual answer of just use niv or some other esoteric solution that a subset of hardcore Nix users like isn't enough. |
|
All Niv does is produce a JSON file with your dependencies, then you use the Nix functions they provide to read and load the dependencies. It is probably the simplest possible dependency management strategy in Nix.
This is also not a Nix specific strategy tbh. If you are using Python, Go, JS, etc they manage dependencies in the same style (lock file with dependencies, tool to update them).
I don’t think the documentation for it is any worse than the rest of Nix (low bar, but we are comparing things in the Nix ecosystem).