cachix / git-hooks.nix

Seamless integration of https://pre-commit.com git hooks with Nix.
Apache License 2.0
542 stars 155 forks source link

`cargo-check` fails with SSL connect error #455

Open Mastermindaxe opened 5 months ago

Mastermindaxe commented 5 months ago

Hi everyone!

When I add cargo-check.enable = true; my nix flake check invocation fails with the following message:

error: builder for '/nix/store/z1malgk1gx5qwpxv2pbb9ri1scglf56n-pre-commit-run.drv' failed with exit code 1;
       last 10 log lines:
       > Caused by:
       >   download of config.json failed
       >
       > Caused by:
       >   failed to download from `https://index.crates.io/config.json`
       >
       > Caused by:
       >   [35] SSL connect error (OpenSSL/3.0.13: error:16000069:STORE routines::unregistered scheme)
       >
       > nixfmt...................................................................Passed
       For full logs, run 'nix-store -l /nix/store/z1malgk1gx5qwpxv2pbb9ri1scglf56n-pre-commit-run.drv'.

I'm running an M2 Macbook Pro if that makes any difference. My nixfmt check runs flawlessly. It's only once I add cargo-check, cargo-clippy or even a custom hook with cargo audit. Am I doing sth wrong? Does it have to do with the sandboxing and the error message is just weird?

EDIT: Can't show the flake as it is work-related, but I can try to make a minimal example if needed

sandydoo commented 5 months ago

Duplicate of #452. PR #396.