cargo-auditable-cargo-wrapper: use makeWrapper
This commit is contained in:
parent
d6856047c8
commit
a19acef56f
1 changed files with 9 additions and 6 deletions
|
@ -1,10 +1,13 @@
|
||||||
{ lib, writeShellScriptBin, cargo, cargo-auditable }:
|
{ lib, runCommand, makeBinaryWrapper, cargo, cargo-auditable }:
|
||||||
|
|
||||||
(writeShellScriptBin "cargo" ''
|
runCommand "cargo" {
|
||||||
export PATH="${lib.makeBinPath [ cargo cargo-auditable ]}:$PATH"
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||||
CARGO_AUDITABLE_IGNORE_UNSUPPORTED=1 exec cargo auditable "$@"
|
|
||||||
'') // {
|
|
||||||
meta = cargo-auditable.meta // {
|
meta = cargo-auditable.meta // {
|
||||||
mainProgram = "cargo";
|
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 ]}
|
||||||
|
''
|
||||||
|
|
Loading…
Reference in a new issue