Unfortunately, the security updates introduced in MacOS Catalina have made installing Nix on the latest version of MacOS a fairly involved process.[1] I looked at using it when I rebuilt my computer recently and decided to wait until it was more baked.
[1] Catalina restricts which directories can be added to the root dir. Nix uses /nix.
The problem here really seems to be with nix. The /nix path shouldn't be hard coded. (Security concerns aside, I don't want a package manager to clutter up my root directory.)
It's necessary to hardcode paths in order to ensure that the exact version of a dependency is linked into the executable.
Without this mechanism, nix packages would not be reproducible and self-contained.
Also, the path isn't really hardcoded. You can use a custom path, but that means you can't use binary caches.
It's not just ELF executables that hardcode the path. There's a ton of different ways to run software which all use hardcoded paths. Which is good! That's the entire value proposition of Nix, in a way, that it's now safe to use hardcoded paths. But you can't edit all those different hardcoded paths in all those different filetypes.
Modifying a string in ELF is hard. As long as the string has the same length as the original one, it has a good chance to work (but still fails for compressed data). But if you want an arbitrary directory, you need to replace it with a different length path, and that will probably break a lot of things.
[1] Catalina restricts which directories can be added to the root dir. Nix uses /nix.