Rust importLockFile flaky network?


I build a few of my own crates using nix and during the dependency download (as part of importLockFile) it keeps failing which fails the nix-buid:
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to

Not sure if there’s some network issues on the server but I wonder if we can make it a bit more robust by retrying a few times.
Is there any way to get the importLockFile to retry a few times?
As an alternative I’m considering making the deps an output so I can first try to build the deps a few times, though doesn’t seem like a good idea.

Any help and/or suggestions would be appreciated,
Thank you!

FYI I’ve got around this by exposing the cargo deps (vendor) and changing the release script to build the deps up to x times before building the actual code…