nixos-configs/scopedPackages/hass-components/spotifyplus/spotifywebapi.nix
matt1432 348a8d666e
All checks were successful
Discord / discord commits (push) Has been skipped
fix(hass): get rid of deprecation warning for spotplus
2024-12-21 17:30:21 -05:00

31 lines
728 B
Nix

{
spotifywebapi-src,
python3Packages,
...
}: let
inherit (builtins) elemAt head readFile split;
tag = head (split "\"" (elemAt (split "VERSION:str = \"" (readFile "${spotifywebapi-src}/spotifywebapipython/const.py")) 2));
in
python3Packages.buildPythonPackage {
pname = "spotifywebapiPython";
version = "${tag}+${spotifywebapi-src.shortRev}";
pyproject = true;
src = spotifywebapi-src;
propagatedBuildInputs = with python3Packages; [
lxml
oauthlib
platformdirs
requests
requests_oauthlib
setuptools
urllib3
zeroconf
smartinspect # overridden in this python3Packages
];
pythonImportsCheck = [
"spotifywebapipython"
];
}