I don’t know… it seems you missed some bits mentioned in the nixpkgs issue. There apparently are ways of getting wrapped lld, e.g. llvmPackages.bintools. So I’d try with that.
Indeed! Apparently, was too tired yesterday to figure out what comments on the issue actually mean
It turns out that there’s more than one lld available in nixpkgs. What I was using was pkgs.lld_14, and that is indeed an “unwrapped” lld. However, the lld is also provided by the llvmPackages_14.bintools, and that one is wrapped and does set up rpath.