at master 873 B view raw
1{ 2 lib, 3 runCommand, 4 clippy-unwrapped, 5 rustc-unwrapped, 6 makeWrapper, 7}: 8 9runCommand "${clippy-unwrapped.pname}-wrapper-${clippy-unwrapped.version}" 10 { 11 preferLocalBuild = true; 12 strictDeps = true; 13 inherit (clippy-unwrapped) outputs; 14 15 nativeBuildInputs = [ makeWrapper ]; 16 17 meta = clippy-unwrapped.meta // { 18 description = "${clippy-unwrapped.meta.description} (wrapper script)"; 19 priority = 10; 20 }; 21 } 22 23 '' 24 mkdir -p $out/bin 25 makeWrapper ${clippy-unwrapped}/bin/cargo-clippy $out/bin/cargo-clippy \ 26 --set-default SYSROOT ${rustc-unwrapped} 27 28 makeWrapper ${clippy-unwrapped}/bin/clippy-driver $out/bin/clippy-driver \ 29 --set-default SYSROOT ${rustc-unwrapped} 30 31 ${lib.concatMapStrings (output: "ln -s ${clippy-unwrapped.${output}} \$${output}\n") ( 32 lib.remove "out" clippy-unwrapped.outputs 33 )} 34 ''