nmattia / niv

Easy dependency management for Nix projects
https://github.com/nmattia/niv
MIT License
1.52k stars 74 forks source link

Fix fetchGit with submodules #351

Closed awidegreen closed 2 years ago

awidegreen commented 2 years ago

The attrset update operator (//) is required to be put in parentheses otherwise the rhs isn't considered by fetchGit.

tfc commented 2 years ago

I just stumbled upon this PR and find it very useful. Does anything block it from being merged?

tfc commented 2 years ago

Although this works nicely, i have some thought about it: If you have a niv source with submodules = true and build it on an older nix, you will most likey run into a failing derivation because the build system does not find the things that it assumes to be located in the submodules. Users might be totally riddled why the build fails.

Asserting that nix is newer or equal to 2.4 in case submodules == true would then help users not running into the same situation.

tfc commented 2 years ago

This can be closed as the other MR fixed it, right?

nmattia commented 2 years ago

I think so. @awidegreen I'll let you re-open if we missed something!