Skip to content

Installing clippy #37

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

Closed
idubrov opened this issue Jan 11, 2018 · 3 comments
Closed

Installing clippy #37

idubrov opened this issue Jan 11, 2018 · 3 comments

Comments

@idubrov
Copy link

idubrov commented Jan 11, 2018

Is there any way I can install rust-src component on top of this image (which is required by clippy)?

This image doesn't include rustup (with which you can do rustup component add rust-src) and I cannot quite figure out what exactly I need to do to emulate rustup comuonent add rust-src.

@clux
Copy link
Owner

clux commented Jan 12, 2018

Oh, interesting, didn't know clippy required this now.

I think you need to grab the corresponding nightly source tarball and extract it somewhere (similar to old racer setup).
Clippy install seems to require SYSROOT=/path/to/rustc/sysroot cargo install clippy without rustup.

@idubrov
Copy link
Author

idubrov commented Jan 12, 2018

Ok, I was completely wrong about rust-src. The real cause was that clippy would be installed for musl target, which lacks librustc.

The correct way to install clippy on top of this image is:

CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu cargo install clippy

@idubrov idubrov closed this as completed Jan 12, 2018
@clux
Copy link
Owner

clux commented Jan 13, 2018

Ah, thanks for the update. I'll make a note of it in the README for future people :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants