/nix/store/5pa1282x1sasbwhmnah6bny1g9pc2lj1-binutils-2.46/bin/ld.bfd: cannot find -lc: No such file or directory /nix/store/5pa1282x1sasbwhmnah6bny1g9pc2lj1-binutils-2.46/bin/ld.bfd: have you installed the static version of the c library ? collect2: error: ld returned 1 exit status
dev shells are recommended but not the problem in this case, using gcc in a seperate env gives the same error.
The actual fix is also installing the glibc.static package