nmattia / niv

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

Add niv branches traking the branches from nixpkgs #328

Open refnil opened 3 years ago

refnil commented 3 years ago

There seems to be some interest for niv having branches compatible with the release branches of nixpkgs. (See https://github.com/nmattia/niv/issues/311)

However, I'd like to ask if it is worth it? Would it really be that useful? In theory, people can already install niv via nixpkgs and have a compatible version that way.

If you have a use case for this feature, please tell us in the comment bellow.

risicle commented 3 years ago

I think the current solution is fine as long as https://raw.githubusercontent.com/nmattia/niv/master/data/nixpkgs.json is reliably updated. (Ideally it wouldn't depend on just the small maintainership of the niv project and nixpkgs itself would supply a more general mechanism)

The only bit missing I think is the ability to have a setup that will jump from release x to release x+1 on a niv update when the time is right. At the moment I think the "latest branch" check will only happen on a niv init.

(this discussion is really meta and hurts my brain)

refnil commented 3 years ago

I just realized that I had misunderstood what you meant all along. I was thinking of the nixpkgs in nix/sources.json that was used to build niv while you are talking about the nixpkgs that is used by default when initializing a project.

The only bit missing I think is the ability to have a setup that will jump from release x to release x+1 on a niv update when the time is right. At the moment I think the "latest branch" check will only happen on a niv init.

I like this idea. It would the default behavior but it could be under a command line flag or something.

risicle commented 3 years ago

I just realized that I had misunderstood what you meant all along.

Yeah this is what I meant by the meta-ness hurting my brain.