Writing an article without pointer is pointless. So here is a start.
Version dependencies are described here http://www.debian.org/doc/debian-policy/ch-relationships.html
For a functional dependency specification (Nix and NixOS) see
Also the RPM specifications are useful but last time I looked it was not so complete as debian.
Nix is really nice but not easy or never to re-implement.