feat(home-assistant): add ha-sourdough custom component #8
@@ -9,6 +9,39 @@
|
|||||||
let
|
let
|
||||||
cfg = config.my.profiles.home-assistant;
|
cfg = config.my.profiles.home-assistant;
|
||||||
hostName = config.networking.hostName;
|
hostName = config.networking.hostName;
|
||||||
|
|
||||||
|
# Python deps for the alexa_media_player custom component. Built against
|
||||||
|
# Home Assistant's own interpreter — the same set buildHomeAssistantComponent
|
||||||
|
# uses — so HA's build-time and runtime manifest-requirement checks pass.
|
||||||
|
haPython = pkgs.home-assistant.python3Packages;
|
||||||
|
|
||||||
|
# dictor is not in nixpkgs; alexa_media_player needs dictor>=0.1.12,<0.2.
|
||||||
|
# Pure-Python, no runtime deps, legacy setup.py.
|
||||||
|
dictor = haPython.buildPythonPackage {
|
||||||
|
pname = "dictor";
|
||||||
|
version = "0.1.12";
|
||||||
|
format = "setuptools";
|
||||||
|
src = haPython.fetchPypi {
|
||||||
|
pname = "dictor";
|
||||||
|
version = "0.1.12";
|
||||||
|
hash = "sha256-bbSDda4eU9ye2EToWzj04/v79qTmC+yjd1Fa0URTuRs=";
|
||||||
|
};
|
||||||
|
build-system = [ haPython.setuptools ];
|
||||||
|
doCheck = false;
|
||||||
|
pythonImportsCheck = [ "dictor" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# nixpkgs ships alexapy 1.29.22; the manifest pins ==1.29.25. Patch bump.
|
||||||
|
# nixpkgs fetches alexapy from GitLab (keatontaylor/alexapy), tag v<version>.
|
||||||
|
alexapy = haPython.alexapy.overridePythonAttrs (old: {
|
||||||
|
version = "1.29.25";
|
||||||
|
src = pkgs.fetchFromGitLab {
|
||||||
|
owner = "keatontaylor";
|
||||||
|
repo = "alexapy";
|
||||||
|
tag = "v1.29.25";
|
||||||
|
hash = "sha256-P/hvgqZVaBJF5dbmHrDjQMC+pwV3EEhKyFIS5KmhgD4=";
|
||||||
|
};
|
||||||
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -38,6 +71,25 @@ in
|
|||||||
hash = "sha256-Uoid/2f6GxZMuE5Keu2VjHPYuOxnYG8hsCD6BYcaTvM=";
|
hash = "sha256-Uoid/2f6GxZMuE5Keu2VjHPYuOxnYG8hsCD6BYcaTvM=";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
(pkgs.buildHomeAssistantComponent {
|
||||||
|
owner = "Alandtse";
|
||||||
|
domain = "alexa_media";
|
||||||
|
version = "5.15.7";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "Alandtse";
|
||||||
|
repo = "alexa_media_player";
|
||||||
|
rev = "v5.15.7";
|
||||||
|
hash = "sha256-1rcZVSX1xA1Lc4qSu39MOitVEciZFhoPQy2y5+PpoAI=";
|
||||||
|
};
|
||||||
|
# Every manifest requirement must be importable at a satisfying
|
||||||
|
# version or manifestCheckPhase fails the build.
|
||||||
|
dependencies = [
|
||||||
|
alexapy
|
||||||
|
dictor
|
||||||
|
haPython.wrapt
|
||||||
|
haPython.packaging
|
||||||
|
];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
extraComponents = [
|
extraComponents = [
|
||||||
|
|||||||
Reference in New Issue
Block a user