Another day another horror
So on musl, getent does not exist. Systemd however wants getent to verify it is installing a system with a uid table not inherently broken together with systemd. Its also used somewhere within nspawn, i am not super familiar with that yet. So far so good.
Well, and then nixpkgs comes along and makes it cursed. As it turns out, netbsd has its own getent implementation. nixpkgs uses the netbsd getent and passes that to systemd, and systemd is happy. Yes, nixpkgs is using core netbsd packages on linux to satisfy systemd requirements.
Now you might wonder how fragile this may be. Surprisingly, not very! If the stars align, that is - somehow the netbsd getent depends on ssp/ssp.h, which on nix is only provided as part of the experimental gcc 15 introduction. This would be fine if gcc 15 were not completely broken on nix musl.
Now you may wonder, why is gcc 15 on musl broken? Don't other distros use gcc 15 on musl? Well, yes! But! Nix has patches to make gcc work correctly with things like the nix store and nix' idea of cross compilation. Those patches were written without considering musl. That means those patches are missing `#include <libgen.h>`.
Ladies and Gentlethems, welcome to the world of software packaging and C programming!













