Skip to content
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

Rust: error: 'cargo-clippy' is not installed for the toolchain 'nightly-x86_64-apple-darwin' but is available on the path #662

Open
duckpuppy opened this issue Jun 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@duckpuppy
Copy link
Contributor

duckpuppy commented Jun 13, 2023

Describe the bug
When setting language.rust.enable = true, all the toolchain packages are available, including cargo-clippy. However, cargo does not seem to know it's there.

To reproduce
https://gist.github.com/duckpuppy/ac757f17ad717429860a79fe031d838b

$ cargo init
     Created binary (application) package

$ cargo clippy
error: 'cargo-clippy' is not installed for the toolchain 'nightly-x86_64-apple-darwin'
To install, run `rustup component add clippy`

$ cargo-clippy
    Checking test-rust-clippy v0.1.0 (/Users/paikens/src/personal/test-rust-clippy)
    Finished dev [unoptimized + debuginfo] target(s) in 0.49s

$ which cargo-clippy
/nix/store/hggdp3ccc41wallkn3lnm4yh4mz6hm5q-devenv-profile/bin/cargo-clippy

$ which cargo
/nix/store/hggdp3ccc41wallkn3lnm4yh4mz6hm5q-devenv-profile/bin/cargo

Version

devenv: 0.6.2

@duckpuppy duckpuppy added the bug Something isn't working label Jun 13, 2023
@cdmistman
Copy link
Contributor

hey @duckpuppy can you try again with latest main now that #667 has landed?

if it still doesn't work, can you try again with languages.rust.channel = "stable";?

@duckpuppy
Copy link
Contributor Author

duckpuppy commented Jul 19, 2023

Sorry for the late reply - this is still an issue after that merge, even using fenix (via setting the channel to "stable" and including the fenix input).

inputs:
  nixpkgs:
    url: github:NixOS/nixpkgs/nixpkgs-unstable
  fenix:
    url: github:nix-community/fenix
    inputs:
      nixpkgs:
        follows: nixpkgs
{ pkgs, ... }:

{
  packages = [ pkgs.git ];

  languages.rust.enable = true;
  languages.rust.channel = "stable";
}

EDIT: This was on a fresh devenv init. I verified that I was using the PR in question by not including the fenix input in devenv.yaml to get the error output about the missing fenix input when specifying the "stable" channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants