Wow, I’m surprised this isn’t the approach patchelf takes! I’d love to see a nixpkgs fork that applies shrinkwrap, and what build failures happen in that world
This looks pretty good. It would be great if a fixupHook is provided similar to autopatchElf hook to help with testing, esp. users can then override the derivation appending that hook. This way it will get some good testing too.