nixpkgs/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix
figsoda 8522d789be cargo-auditable-cargo-wrapper: fix wrapper
Packages were not correctly built with carog-auditable due to the
missing auditable flag
2023-08-13 14:44:19 -04:00

15 lines
436 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 ]} \
--add-flags auditable
''