Compare this to the model we have in Spack (which is inspired by nix), where there's one recipe per package for many versions, and you can define different build flavors, conditional dependencies (and conditional pretty much everything).
The difference is that Spack has a dependency solver and Nix apparently does not?
For example the curl package [1] has tons of versions, and its `tls` package variant has conditional values depending on the version:
variant("tls", values=("gnutls", conditional("mbedtls", when="@7.46:"), ...), multi=True)
And dependencies are specified as depends_on("gnutls", when="tls=gnutls")
with when("tls=mbedtls"):
depends_on("mbedtls@2:", when="@7.79:")
depends_on("mbedtls@:2", when="@:7.78")
This allows you both to install all sorts of curls, like `spack install curl tls=mbedtls` (gives you something >= 7.46), or `spack install curl@7.77 tls=mbedtls` gives you a curl with an old mbedtls, etc.[1] https://github.com/spack/spack/blob/develop/var/spack/repos/...