$LD_LIBRARY_PATH is a runtime alternative to
Is there something similar for
pathelf --set-interpreter ?
The case is executables inside jar files downloaded from Maven.
For example https://github.com/os72/protoc-jar has executables with interpreter set to
/lib64/ld-linux-x86-64.so.2 so they fail to run on NixOS.
patchelfing would be weird here, in that case the files under
$HOME/.m2/ will have nix store paths, which could be garbage collected on the next upgrade.
I’d rather patch
glibc to make such executables work than would make a cron job updating executables inside jars to the current valid interpreter.
Upstream ticket is WONTFIX: https://github.com/os72/protoc-jar/issues/26