The files stated by nix-locate do actually not exist in this package.
I regenerated the index to make sure it is up to date.
~/p/g/m/debug ❯❯❯ nix --version
nix (Nix) 2.3.6
~/p/g/m/debug ❯❯❯ nix-locate libstdc++.so.6
...
(gcc9.out) 0 s /nix/store/zhbhxp4jgalycwffildy2bwcgmrsmayk-gcc-9.2.0-lib/lib/libstdc++.so.6
(gcc9.out) 1,948,144 x /nix/store/zhbhxp4jgalycwffildy2bwcgmrsmayk-gcc-9.2.0-lib/lib/libstdc++.so.6
(gcc9.out) 2,491 r /nix/store/zhbhxp4jgalycwffildy2bwcgmrsmayk-gcc-9.2.0-lib/lib/libstdc++.so.6
gcc-unwrapped.lib 0 s /nix/store/danv012gh0aakh8xnk2b35vahklz72mk-gcc-9.2.0-lib/lib/libstdc++.so.6
gcc-unwrapped.lib 1,948,144 x /nix/store/danv012gh0aakh8xnk2b35vahklz72mk-gcc-9.2.0-lib/lib/libstdc++.so.6
gcc-unwrapped.lib 2,491 r /nix/store/danv012gh0aakh8xnk2b35vahklz72mk-gcc-9.2.0-lib/lib/libstdc++.so.6
(gcc10.out) 0 s /nix/store/4sij37wjm4ax81kwbp22lqwaavhmngm0-gcc-10.1.0-lib/lib/libstdc++.so.
(gcc10.out) 1,903,088 x /nix/store/4sij37wjm4ax81kwbp22lqwaavhmngm0-gcc-10.1.0-lib/lib/libstdc++.so.
(gcc10.out) 2,494 r /nix/store/4sij37wjm4ax81kwbp22lqwaavhmngm0-gcc-10.1.0-lib/lib/libstdc++.so.
...
~/p/g/m/debug ❯❯❯ nix-build -A nixpkgs.gcc10.out
~/p/g/m/debug ❯❯❯ ls result/lib
ls: cannot access 'result/lib': No such file or directory
The files stated by
nix-locate
do actually not exist in this package. I regenerated the index to make sure it is up to date.