I’d like to override stdenv for a package + all of it’s dependencies (i.e. shared libraries).
For instance, enableDebug, I’d like to turn it on for a pkg and it’s dependencies but not have to rebuild all the tools used to build it.
Just to be clear, when you say you don’t want to build rebuild all the tools, you mean that you want to set something like enableDebug (or any other arbitrary config overrides) for only the package and its direct dependencies, but not the dependencies’ dependencies, and so on?
I personally don’t know of any standard tools that would let you do that. You could try playing around with overriding to approach something useful. Maybe something like this?