I would like to override the stdenv just for Haskell packages so that I can use a different linker (lld).
The obvious thing is to do something like:
self: super: {
haskell = super.haskell.override { stdenv = lldStdenv; };
}
This doesn’t work since haskell makes use of the pkgs argument as well as sets like buildPackages, etc.
I could go through all of these (pkgs, buildPackages, targetPackages, etc) and override them all as well individually but it feels like there should be a better way to do this.
I also tried using newScope to overlay a different stdenv and then use that to callPackage the Haskell package set, but that also didn’t modify the other sets.
I do not want to override stdenv in general though, since then the whole world would rebuild.
I just want to override stdenv wherever it is used in haskellPackages whether it’s directly or through something like targetPackages.stdenv.
Any ideas?