As you may know there is no native way to know which nixpkgs commit should I install in order to have older versions of a package. This is because nix-env -qa usually offers 1 version (the latest). More about it here
So I think it would be awesome to embed into niv search the Nixpkgs database so users can find all versions associated to a package and then add it to their projects easily, for instance $ niv search niv can display information similar to this: https://kamadorueda.github.io/nixpkgs-db/#/pkg/niv (or display into console the data). The experience is up to us, please see below.
What I imagine is the best user experience possible is:
$ niv search awscli
4 matching packages found:
0. awscli
1. awscli2
2. python27Packages.awscli
3. ....
Which package do you want to inspect? Please type the number
> 0
Available versions:
0. 1.9.6
1. 1.9.12
2. 1.7.47
3. ....
Which version do you want to install? Please type the number
> 1
Installing awscli @ 1.9.12
Done!
I can work on an HTTP API at Nixpkgs Database that outputs JSON documents so Niv can consume it, I can also work on the niv-search command (although it may be faster if you guys work on this part as you know better the project)
Hey! I think that's a great idea, though niv might not be the best place, since it doesn't deal with nixpkgs at all. What about creating a new executable?
As you may know there is no native way to know which nixpkgs commit should I install in order to have older versions of a package. This is because nix-env -qa usually offers 1 version (the latest). More about it here
So I think it would be awesome to embed into
niv search
the Nixpkgs database so users can find all versions associated to a package and then add it to their projects easily, for instance$ niv search niv
can display information similar to this: https://kamadorueda.github.io/nixpkgs-db/#/pkg/niv (or display into console the data). The experience is up to us, please see below.What I imagine is the best user experience possible is:
I can work on an HTTP API at Nixpkgs Database that outputs JSON documents so Niv can consume it, I can also work on the
niv-search
command (although it may be faster if you guys work on this part as you know better the project)Let me know your thoughts !