mcu: fix extraCargoBuildArgs skipped on Stabilizer variants, & simplify optional args #61

Merged
sb10q merged 2 commits from harry/nix-scripts:fix-mcu into master 2021-07-20 18:50:58 +08:00
Showing only changes of commit 92911099d9 - Show all commits

View File

@ -53,10 +53,10 @@ let
in in
pkgs.lib.attrsets.mapAttrs' pkgs.lib.attrsets.mapAttrs'
(name: value: pkgs.lib.attrsets.nameValuePair ("stabilizer-" + name) (name: value: pkgs.lib.attrsets.nameValuePair ("stabilizer-" + name)
(buildStm32Firmware { (buildStm32Firmware ({
name = "stabilizer-" + name; name = "stabilizer-" + name;
# If binaryName is not specified, use the attribute name as binaryName by default. # If binaryName is not specified, use the attribute name as binaryName by default.
binaryName = if (value ? binaryName) then value.binaryName else name; binaryName = name;
cargoDepsName = "stabilizer"; cargoDepsName = "stabilizer";
src = <stabilizerSrc>; src = <stabilizerSrc>;
patchPhase = '' patchPhase = ''
@ -67,7 +67,7 @@ in
"Ipv4Address::new(192, 168, 1, 1)" "Ipv4Address::new(192, 168, 1, 1)"
''; '';
doCheck = false; doCheck = false;
})) { } // value))) {
dual-iir = {}; dual-iir = {};
dual-iir-pounder_v1_1 = { dual-iir-pounder_v1_1 = {
binaryName = "dual-iir"; binaryName = "dual-iir";