feat: introduce cargoTestFlags and cargoBuildFlags for the crane builder

This commit is contained in:
Yusuf Bera Ertan 2022-11-13 15:13:07 +03:00
parent 6f840b11f1
commit 81a155921a
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA
2 changed files with 5 additions and 2 deletions

View File

@ -27,4 +27,7 @@ in rec {
# the tests seem to be undeterministic if ran in parallel
disable-parallel-tests.RUST_TEST_THREADS = 1;
};
linemd = {
fix-tests.cargoTestFlags = "--features svg";
};
}

View File

@ -69,8 +69,8 @@
'';
# Make sure cargo only builds & tests the package we want
cargoBuildCommand = "cargo build --release --package ${pname}";
cargoTestCommand = "cargo test --release --package ${pname}";
cargoBuildCommand = "cargo build \${cargoBuildFlags:-} --release --package ${pname}";
cargoTestCommand = "cargo test \${cargoTestFlags:-} --release --package ${pname}";
};
# The deps-only derivation will use this as a prefix to the `pname`