clippy: fix build (#152211)

This commit is contained in:
Jörg Thalheim 2022-01-01 06:31:57 +00:00 committed by GitHub
parent 1a66fe1035
commit aaff0d644f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,10 @@ rustPlatform.buildRustPackage {
# (/private/tmp/nix-build-clippy-1.36.0.drv-0/rustc-1.36.0-src/src/librustc_llvm)
doCheck = false;
preBuild = ''
export CARGO_TARGET_DIR="$(pwd)/target"
'';
preFixup = lib.optionalString stdenv.isDarwin ''
install_name_tool -add_rpath "${rustc}/lib" $out/bin/clippy-driver
'';