Nixpkgs/nixos-unstable - many package fail with `GLIBC_2.38' not found

I am a bit stumped, a bunch of packages seem broken in nixpkgs/nixos-unstable.
Quite often I get errors like those

[nix-shell:~]$ yambar 
yambar: /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/ version `GLIBC_2.38' not found (required by /nix/store/zrq9b75k3sv0l45n66rz72c4h03i1dbw-glib-2.76.4/lib/

All the nwg-shell packages too. nwg-launchers nwg-displays nwg-drawer nwg-panel nwg-dock nwg-look nwg-menu nwg-bar

Am I holding it wrong or are they indeed all build for the wrong glibc or fail track the correct dependencies?

I’m quite new to nix, I don’t understand the tooling enough to give good context.
However I can say that I do find glibc-2.38-23 in my nix-store.
So it’s really just a matter of the ldd looking in the wrong place. (Or rather that it wasn’t told to include the right glibc in the library paths I suppose)

Are you on Arch or another bleeding-edge distro? If so, you might be hitting this issue: Nix Package Manager on Arch Linux: "`GLIBC_2.38' not found" Error · Issue #9203 · NixOS/nix · GitHub

NixOS. Flake based install, initially with nixpkgs 23.05 but I later switched to unstable because of missing packages.

I switched by changing the flake URL for nixpackages.

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixpkgs-coolercontrol.url = "github:codifryed/nixpkgs/coolercontrol-0.17.0";
    nixos-hardware.url = "github:NixOS/nixos-hardware/master";

Can’t imagine I did something wrong by the way I changed that. Because of how nixos is supposed to be side-effect free. But I thought I mention it.

But that issue had an important hint.

› nix-shell -p yambar

[nix-shell:~/git/nix-config/nix]$ echo $LD_LIBRARY_PATH 

[nix-shell:~/git/nix-config/nix]$ unset LD_LIBRARY_PATH

[nix-shell:~/git/nix-config/nix]$ yambar 
 err: main.c:325: could not find a configuration (see man 5 yambar)

So, what is setting my $LD_LIBRARY_PATH and why? Turns out my cargo cult nixconfig had some unexptected surprises

 home = {
    sessionVariables = {
      # TODO: Not sure what the right way of doing this is...
      # The list of packages is a subset of `GI_TYPELIB_PATH` in `nix-shell -p gobject-introspection gtk4`.
      GI_TYPELIB_PATH = "$GI_TYPELIB_PATH:${pkgs.gobject-introspection.out}/lib/girepository-1.0:${pkgs.gtk4.out}/lib/girepository-1.0:${pkgs.graphene.out}/lib/girepository-1.0:${pkgs.gdk-pixbuf.out}/lib/girepository-1.0:${pkgs.harfbuzz.out}/lib/girepository-1.0:${pkgs.pango.out}/lib/girepository-1.0";
      LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${pkgs.glib.out}/lib";

Thanks for your help. Complete PEBCAK as it turns out.