Also wrap rustc
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
c8a98a05ee
commit
8b303e62b9
1 changed files with 18 additions and 1 deletions
|
|
@ -49,6 +49,18 @@ let
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
'';
|
'';
|
||||||
|
rustc-wrapper = pkgs.writeShellScriptBin "rustc" ''
|
||||||
|
case "$RUSTUP_TOOLCHAIN" in
|
||||||
|
${lib.strings.concatMapAttrsStringSep "\n" (name: _: ''
|
||||||
|
${name})
|
||||||
|
exec ${toolchains.${name}}/bin/rustc "$@"
|
||||||
|
;;
|
||||||
|
'') driverMap}
|
||||||
|
*)
|
||||||
|
exec ${craneLib.rustc}/bin/rustc "$@"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
pkgs.runCommandLocal "cargo-dylint-wrapped"
|
pkgs.runCommandLocal "cargo-dylint-wrapped"
|
||||||
{
|
{
|
||||||
|
|
@ -66,7 +78,12 @@ pkgs.runCommandLocal "cargo-dylint-wrapped"
|
||||||
lib.strings.makeLibraryPath (builtins.map (v: v.package) lints)
|
lib.strings.makeLibraryPath (builtins.map (v: v.package) lints)
|
||||||
}" \
|
}" \
|
||||||
--set DYLINT_DRIVER_PATH ${drivers} \
|
--set DYLINT_DRIVER_PATH ${drivers} \
|
||||||
--prefix PATH : ${lib.makeBinPath [ cargo-wrapper ]}
|
--prefix PATH : ${
|
||||||
|
lib.makeBinPath [
|
||||||
|
cargo-wrapper
|
||||||
|
rustc-wrapper
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
ln -s ${cargo-dylint}/bin/dylint-link $out/bin/dylint-link
|
ln -s ${cargo-dylint}/bin/dylint-link $out/bin/dylint-link
|
||||||
''
|
''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue