diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-04-24 18:18:23 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-04-24 23:41:03 +0000 |
commit | a19acef56f2d1c95ff1c346122d495f624445bc2 (patch) | |
tree | b78fb9efda08370f56a6695055582cbcc3345c61 /pkgs/development/compilers/rust | |
parent | d6856047c8765adf68b13f4b46c7d23e0d2d9cff (diff) | |
download | nixlib-a19acef56f2d1c95ff1c346122d495f624445bc2.tar nixlib-a19acef56f2d1c95ff1c346122d495f624445bc2.tar.gz nixlib-a19acef56f2d1c95ff1c346122d495f624445bc2.tar.bz2 nixlib-a19acef56f2d1c95ff1c346122d495f624445bc2.tar.lz nixlib-a19acef56f2d1c95ff1c346122d495f624445bc2.tar.xz nixlib-a19acef56f2d1c95ff1c346122d495f624445bc2.tar.zst nixlib-a19acef56f2d1c95ff1c346122d495f624445bc2.zip |
cargo-auditable-cargo-wrapper: use makeWrapper
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r-- | pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix b/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix index b50097d5e66b..bddd5735667c 100644 --- a/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix +++ b/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix @@ -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 ]} +'' |