It's actually an unavoidable consequence of what makes Nix great. There is no loader that looks up libs in /lib, the paths are directly hardcoded into the binary. This is how Nix sidesteps versioning hell entirely.
It really isn't unavoidable on macOS. @rpath is designed specifically to handle this sort of thing, and is how all the command line tools distributed with Xcode link to libraries embedded in Xcode and continue working even when you drag Xcode to a new location.
Admittedly supporting that would require updating how all the tools are built and not just defaulting to Whatever Linux Does™, which is probably too much effort to justify in this case, but it is hardly an unsolvable (or even an unsolved) problem.