depot/third_party/nixpkgs/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

13 lines
408 B
Nix

{ lib, runCommand, makeBinaryWrapper, cargo, cargo-auditable }:
runCommand "auditable-${cargo.name}" {
nativeBuildInputs = [ makeBinaryWrapper ];
meta = cargo-auditable.meta // {
mainProgram = "cargo";
};
} ''
mkdir -p $out/bin
makeWrapper ${cargo}/bin/cargo $out/bin/cargo \
--set CARGO_AUDITABLE_IGNORE_UNSUPPORTED 1 \
--prefix PATH : ${lib.makeBinPath [ cargo cargo-auditable ]}
''