feat: add home assistant capability with pi-relay
This commit is contained in:
parent
2374e3cd60
commit
4f7ac0e7d7
13 changed files with 415 additions and 35 deletions
54
flake.nix
54
flake.nix
|
|
@ -108,6 +108,23 @@
|
|||
cargoExtraArgs = "-p noisebell";
|
||||
};
|
||||
|
||||
piRelayArgs = {
|
||||
inherit src;
|
||||
pname = "noisebell-pi-relay";
|
||||
version = "0.1.0";
|
||||
strictDeps = true;
|
||||
doCheck = false;
|
||||
|
||||
CARGO_BUILD_TARGET = "aarch64-unknown-linux-gnu";
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER = "${crossPkgs.stdenv.cc.targetPrefix}cc";
|
||||
TARGET_CC = "${crossPkgs.stdenv.cc.targetPrefix}cc";
|
||||
CC_aarch64_unknown_linux_gnu = "${crossPkgs.stdenv.cc.targetPrefix}cc";
|
||||
HOST_CC = "${pkgs.stdenv.cc.nativePrefix}cc";
|
||||
|
||||
depsBuildBuild = [ crossPkgs.stdenv.cc ];
|
||||
cargoExtraArgs = "-p noisebell-relay";
|
||||
};
|
||||
|
||||
piArtifacts = piCraneLib.buildDepsOnly piArgs;
|
||||
|
||||
noisebell-pi = piCraneLib.buildPackage (
|
||||
|
|
@ -117,6 +134,15 @@
|
|||
}
|
||||
);
|
||||
|
||||
piRelayArtifacts = piCraneLib.buildDepsOnly piRelayArgs;
|
||||
|
||||
noisebell-pi-relay = piCraneLib.buildPackage (
|
||||
piRelayArgs
|
||||
// {
|
||||
cargoArtifacts = piRelayArtifacts;
|
||||
}
|
||||
);
|
||||
|
||||
piStaticArgs = {
|
||||
inherit src;
|
||||
pname = "noisebell-pi-static";
|
||||
|
|
@ -134,6 +160,23 @@
|
|||
cargoExtraArgs = "-p noisebell";
|
||||
};
|
||||
|
||||
piRelayStaticArgs = {
|
||||
inherit src;
|
||||
pname = "noisebell-pi-relay-static";
|
||||
version = "0.1.0";
|
||||
strictDeps = true;
|
||||
doCheck = false;
|
||||
|
||||
CARGO_BUILD_TARGET = "aarch64-unknown-linux-musl";
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER = "${muslPkgs.stdenv.cc.targetPrefix}cc";
|
||||
TARGET_CC = "${muslPkgs.stdenv.cc.targetPrefix}cc";
|
||||
CC_aarch64_unknown_linux_musl = "${muslPkgs.stdenv.cc.targetPrefix}cc";
|
||||
HOST_CC = "${pkgs.stdenv.cc.nativePrefix}cc";
|
||||
|
||||
depsBuildBuild = [ muslPkgs.stdenv.cc ];
|
||||
cargoExtraArgs = "-p noisebell-relay";
|
||||
};
|
||||
|
||||
piStaticArtifacts = piCraneLib.buildDepsOnly piStaticArgs;
|
||||
|
||||
noisebell-pi-static = piCraneLib.buildPackage (
|
||||
|
|
@ -143,6 +186,15 @@
|
|||
}
|
||||
);
|
||||
|
||||
piRelayStaticArtifacts = piCraneLib.buildDepsOnly piRelayStaticArgs;
|
||||
|
||||
noisebell-pi-relay-static = piCraneLib.buildPackage (
|
||||
piRelayStaticArgs
|
||||
// {
|
||||
cargoArtifacts = piRelayStaticArtifacts;
|
||||
}
|
||||
);
|
||||
|
||||
piImageBaseModule =
|
||||
{
|
||||
lib,
|
||||
|
|
@ -359,7 +411,9 @@
|
|||
|
||||
packages.aarch64-linux = {
|
||||
noisebell = noisebell-pi;
|
||||
noisebell-relay = noisebell-pi-relay;
|
||||
noisebell-static = noisebell-pi-static;
|
||||
noisebell-relay-static = noisebell-pi-relay-static;
|
||||
default = noisebell-pi;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue