Each pkgs.buildGoModule create a .go-modules sub derivation that is equivalent
to the vendor directory (aka it is copied to vendor). Before we have a cache
miss because this sub derivation has another name but it is the same (comapared
with nix-diff) here we rename this sub derivation to hit the network only once.
before:
$ nix build .#all --dry-run
these 15 derivations will be built:
/nix/store/64z5ixzsfd536jkybap6364wlkm4s8jn-admin-202208232340-go-modules.drv
/nix/store/hjj8dv97h00y5wfvw4xk0ax4745473zl-frontend-202208232340-go-modules.drv
/nix/store/xrx1b6hnvq13qkijqrbw7jsbr3gf5fn8-dashboard-202208232340-go-modules.drv
/nix/store/kv0spqnh3il0lgimg7gk40cxh5gspvkp-dashboard-202208232340.drv
/nix/store/mpa6f97mrvfq7nd0vrwgsq9z2k3hhzgw-scores-sync-zqds-202208232340-go-modules.drv
/nix/store/nl1p2k58rdazvjhpifc76948x5bjwr0f-repochecker-202208232340-go-modules.drv
/nix/store/pc290pk0rxhm2vrrbn78f92r3k7mmhzx-backend-202208232340-go-modules.drv
/nix/store/p5v7ghgndp78gx7g653kdw4yasyxnlad-backend-202208232340.drv
/nix/store/sj3vv4sxva1rkrxrb6k7p66vq1b5nlgq-qa-202208232340-go-modules.drv
/nix/store/q3f00kq76iq453awbihgh30r8j9np7g0-qa-202208232340.drv
/nix/store/q6zcphpyqlk5yc9r0z9c4lbayvr1rnm6-scores-sync-zqds-202208232340.drv
/nix/store/r4bq4b8g0pjn3k0r9wh70divbm9m7m3v-frontend-202208232340.drv
/nix/store/wffyj2nbgzi0qmv6iqx0kn0hzzm41i61-repochecker-202208232340.drv
/nix/store/yfisx4c6zhqcqyflbj064s0p60930v82-admin-202208232340.drv
/nix/store/vk06zp9q2hs6149n363hmk8azfhxr683-fic-all.drv
this path will be fetched (0.01 MiB download, 0.04 MiB unpacked):
/nix/store/7cifvbmgjm5y9ds5a7c6c861g1xcm1qr-stdenv-linux
after:
$ nix build .#all --dry-run
these 9 derivations will be built:
/nix/store/826caq9p8rphffwyrvcpxgrs6p3xla13-fic-.-.-202208232340-go-modules.drv
/nix/store/29gr8z8zm1qxd3hg4nfj5zpz39w5239j-qa-202208232340.drv
/nix/store/2clvljkrlpfxfrlb4cyk68n8zq5xg3m4-dashboard-202208232340.drv
/nix/store/5nz6izdjhsklq354m1fdssbadr2fnpkk-repochecker-202208232340.drv
/nix/store/95pzd7y6n99v4dn4xyfi677kmdq536qg-frontend-202208232340.drv
/nix/store/i79s2fkj5g75729lg76b2i126m7q36w9-scores-sync-zqds-202208232340.drv
/nix/store/q1v7hq02hmqn4nql5rcyiwf6grlrdc4q-admin-202208232340.drv
/nix/store/vkid4pr7r6w3glfhfyfg5malp501jkaf-backend-202208232340.drv
/nix/store/f94c2m5fq6il03f97lyswcwg15s3c50w-fic-all.drv
this path will be fetched (0.01 MiB download, 0.04 MiB unpacked):
/nix/store/7cifvbmgjm5y9ds5a7c6c861g1xcm1qr-stdenv-linux