Nixos-rebuild fails because bash is broken (dependency issue in libpthread.so.0, undefined symbol: __nanosleep_nocancel)

Should be only a temporary breakage due to breaking changes in the GNU C library (glibc) version 2.31 (Nixpkgs merge: 5e7d581ffdba220d088ed92f382a41acb37670e1).

I believe that due to impurities it can happen that binaries build with glibc 2.30 do now load glibc 2.31 which causes these issues (as e.g. the __nanosleep_nocancel function was removed). Another such breakage: MESA-LOADER: failed to open $driver · Issue #94315 · NixOS/nixpkgs · GitHub

But I haven’t really looked into the details (e.g. why a newer glibc version is used / where the impurities come from - but I think there is already an old Nix/Nixpkgs issue about this).