-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run clippy in a check #195
Comments
This is a bit of a hack, but one way to do it is:
The first and last steps are the real magic. The rest are just fixing things up. I think, in the absense of worktrees, you may also be able to do this in a Cargo.nix |
Oh, I found an even more straightforward way!
This avoids copying and ensures you're using the same lockfile that crate2nix used to produce the cargo config. You may still need to patch up your |
Also comment on crate2nix issue explaining how to do it: nix-community/crate2nix#195
Making a derivation that runs
cargo clippy
fails due to trying to download the dependencies.Looking at the clippy page it seems it can be run as
rustc
usingclippy-driver
. Is there a way with thecrate2nix
logic to follow this through or does something need to be added tobuildRustCrate
in nixpkgs?If there is another nice way to run clippy in a derivation (looking at it for a flake check) then that would also be great.
The text was updated successfully, but these errors were encountered: