cargo-auditable-cargo-wrapper: init
This commit is contained in:
parent
ac17e99f6c
commit
a6137b73f9
|
@ -12,6 +12,7 @@
|
|||
, cargoNextestHook
|
||||
, cargoSetupHook
|
||||
, cargo-auditable
|
||||
, cargo-auditable-cargo-wrapper
|
||||
, rustc
|
||||
, libiconv
|
||||
, windows
|
||||
|
@ -116,11 +117,13 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
|
|||
|
||||
cargoCheckFeatures = checkFeatures;
|
||||
|
||||
cargoCommand = if auditable then "cargo auditable" else "cargo";
|
||||
|
||||
patchRegistryDeps = ./patch-registry-deps;
|
||||
|
||||
nativeBuildInputs = nativeBuildInputs ++ [
|
||||
nativeBuildInputs = nativeBuildInputs ++ lib.optionals auditable [
|
||||
(cargo-auditable-cargo-wrapper.override {
|
||||
inherit cargo-auditable;
|
||||
})
|
||||
] ++ [
|
||||
cacert
|
||||
git
|
||||
cargoBuildHook
|
||||
|
@ -128,8 +131,6 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
|
|||
cargoInstallHook
|
||||
cargoSetupHook
|
||||
rustc
|
||||
] ++ lib.optionals auditable [
|
||||
cargo-auditable
|
||||
];
|
||||
|
||||
buildInputs = buildInputs
|
||||
|
|
|
@ -31,7 +31,7 @@ cargoBuildHook() {
|
|||
"CXX_@rustBuildPlatform@=@cxxForBuild@" \
|
||||
"CC_@rustTargetPlatform@=@ccForHost@" \
|
||||
"CXX_@rustTargetPlatform@=@cxxForHost@" \
|
||||
${cargoCommand-cargo} build -j $NIX_BUILD_CORES \
|
||||
cargo build -j $NIX_BUILD_CORES \
|
||||
--target @rustTargetPlatformSpec@ \
|
||||
--frozen \
|
||||
${cargoBuildProfileFlag} \
|
||||
|
|
|
@ -33,7 +33,7 @@ cargoCheckHook() {
|
|||
|
||||
(
|
||||
set -x
|
||||
${cargoCommand-cargo} test \
|
||||
cargo test \
|
||||
-j $NIX_BUILD_CORES \
|
||||
${argstr} -- \
|
||||
--test-threads=${threads} \
|
||||
|
|
|
@ -33,7 +33,7 @@ cargoNextestHook() {
|
|||
|
||||
(
|
||||
set -x
|
||||
${cargoCommand-cargo} nextest run \
|
||||
cargo nextest run \
|
||||
-j ${threads} \
|
||||
${argstr} -- \
|
||||
${checkFlags} \
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{ lib, writeShellApplication, cargo, cargo-auditable }:
|
||||
|
||||
(writeShellApplication {
|
||||
name = "cargo";
|
||||
runtimeInputs = [ cargo cargo-auditable ];
|
||||
text = ''
|
||||
CARGO_AUDITABLE_IGNORE_UNSUPPORTED=1 cargo auditable "$@"
|
||||
'';
|
||||
}) // {
|
||||
meta = cargo-auditable.meta // {
|
||||
mainProgram = "cargo";
|
||||
};
|
||||
}
|
|
@ -21,11 +21,11 @@ in rustPlatform.buildRustPackage rec {
|
|||
checkType = "debug";
|
||||
|
||||
postBuild = ''
|
||||
$cargoCommand cbuild --release --frozen --prefix=${placeholder "out"} --target ${rustTargetPlatformSpec}
|
||||
cargo cbuild --release --frozen --prefix=${placeholder "out"} --target ${rustTargetPlatformSpec}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
$cargoCommand cinstall --release --frozen --prefix=${placeholder "out"} --target ${rustTargetPlatformSpec}
|
||||
cargo cinstall --release --frozen --prefix=${placeholder "out"} --target ${rustTargetPlatformSpec}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -15206,6 +15206,7 @@ with pkgs;
|
|||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
cargo-auditable = callPackage ../development/tools/rust/cargo-auditable { };
|
||||
cargo-auditable-cargo-wrapper = callPackage ../development/tools/rust/cargo-auditable/cargo-wrapper.nix { };
|
||||
cargo-bisect-rustc = callPackage ../development/tools/rust/cargo-bisect-rustc {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
openssl = openssl_1_1;
|
||||
|
|
Loading…
Reference in a new issue