I feel like arguably such derivations should not exist in the first place, because breakage caused by that sounds extremely hard to debug.
If there is a better way than relying on list order, surely that way should be taken, so I’d love to see if there are any packages where it’s impossible to do this any other way.
I assume, at minimum, anything that builds a *PATH or a sequence of potentially-overriding arguments could be order sensitive under the right circumstances. Yeah?
I can’t say I know of one, but I’d bet at least a few exist. Grepping around, this smells about like I’d expect:
Propagation is the most common culprit. For example, if you have anything built with python3.pkgs.buildPythonApplication, it might shadow Python environment created with python3.withPackages … that comes after it.
That’s why we are clearing propagation out in e.g. Meson, gtk-doc, etc.:
Yep, I’d just like to know what those circumstances are I’m not saying it’s not a valid use case, but it’s one I find hard to imagine. How often do we really have two dependencies with matching things in PATH, where one is a subset of the other but needs to replace some binaries for some reason? And is there perhaps a better solution for those cases?
Having an explicit opt-in would actually help with debugging such derivations, so I think this is an argument for what @Atemu suggests. Assuming the exceptions can be detected.