You’ll want to use LD_PRELOAD and point it to glibc 2.34+.
What’s the underlying issue?
An older version of glibc is being loaded first, which brings in older glibc symbols. Then some other tool is linked against a newer version of glibc, and tries to ensure that a compatible glibc is being used. Glibc is only backwards compatible, not forwards.
I want to execute for example emacs in my nix-shell, but I can’t.
I saw a potential solution for this issue, which is to add steam-run to nix-shell, but I see the same error.