nixos-configs/legacyPackages/hass-components/spotifyplus/spotifyplus.nix
matt1432 c68779da23
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(hass): clean up and remove sonos for spotifyplus
2024-09-30 13:39:09 -04:00

34 lines
807 B
Nix

{
spotifyplus-src,
buildHomeAssistantComponent,
python3Packages,
...
}: let
inherit (builtins) fromJSON readFile;
manifest = fromJSON (readFile "${spotifyplus-src}/custom_components/spotifyplus/manifest.json");
in
buildHomeAssistantComponent {
owner = "thlucas1";
inherit (manifest) domain version;
src = spotifyplus-src;
prePatch = ''
substituteInPlace ./custom_components/spotifyplus/manifest.json \
--replace-warn "urllib3>=1.21.1,<1.27" "urllib3>=1.21.1"
'';
propagatedBuildInputs = with python3Packages; [
oauthlib
platformdirs
requests
requests_oauthlib
soco
urllib3
zeroconf
smartinspect # overridden in this python3Packages
spotifywebapi # overridden in this python3Packages
];
}