1
0
Fork 0

mcu: disable by-default `cargo test` checkPhase for Stabilizer

This commit is contained in:
Harry Ho 2021-06-28 15:11:06 +08:00
parent 2a87c55e62
commit 2835575ee4
1 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@ let
rustPlatform = pkgs.recurseIntoAttrs (pkgs.callPackage ./rustPlatform.nix {
inherit rustManifest;
});
buildStm32Firmware = { name, src, patchPhase ? "", extraNativeBuildInputs ? [], checkPhase ? "", ... } @ args:
buildStm32Firmware = { name, src, patchPhase ? "", extraNativeBuildInputs ? [], checkPhase ? "", doCheck ? true, ... } @ args:
let
# If binaryName is specified as an arg of buildStm32Firmware,
# then the .nix containing the cargoSha256 must be named "cargosha256-${binaryName}.nix";
@ -37,7 +37,7 @@ let
cargo build --release
'';
inherit checkPhase;
inherit checkPhase doCheck;
installPhase = ''
mkdir -p $out $out/nix-support
cp target/thumbv7em-none-eabihf/release/${binaryName} $out/${name}.elf
@ -62,6 +62,7 @@ in
--replace "Ipv4Address::new(10, 34, 16, 1)" \
"Ipv4Address::new(192, 168, 1, 1)"
'';
doCheck = false;
};
thermostat = buildStm32Firmware {
name = "thermostat";