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" ''
|
||||
export PATH="${lib.makeBinPath [ cargo cargo-auditable ]}:$PATH"
|
||||
CARGO_AUDITABLE_IGNORE_UNSUPPORTED=1 exec cargo auditable "$@"
|
||||
'') // {
|
||||
runCommand "cargo" {
|
||||
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 ]}
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue