Like I said in another comment, the problem is curating the giant database that maps version numbers to commit refs. Once you pass this roadblock, the tools Nix gives you make dependency resolution a quite a bit simpler problem to solve.
The next step is then realizing you actually don't need the useless legacy version numbering scheme at all, and that you wasted that effort for nothing.