Merge pull request #286868 from dotlambda/youtubeaio-init
home-assistant: support youtube component
This commit is contained in:
commit
961c422b48
4 changed files with 71 additions and 1 deletions
59
pkgs/development/python-modules/youtubeaio/default.nix
Normal file
59
pkgs/development/python-modules/youtubeaio/default.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, poetry-core
|
||||
, aiohttp
|
||||
, pydantic
|
||||
, yarl
|
||||
, aresponses
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, syrupy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "youtubeaio";
|
||||
version = "1.1.5";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "joostlek";
|
||||
repo = "python-youtube";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-utkf5t6yrf0f9QBIaDH6MxKduNZOsjfEWfQnuVyUoRM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i "/^addopts/d" pyproject.toml
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aiohttp
|
||||
pydantic
|
||||
yarl
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "youtubeaio" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
aresponses
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
syrupy
|
||||
];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/joostlek/python-youtube/releases/tag/v${version}";
|
||||
description = "Asynchronous Python client for the YouTube V3 API";
|
||||
homepage = "https://github.com/joostlek/python-youtube";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
|
@ -5633,7 +5633,8 @@
|
|||
fnv-hash-fast
|
||||
psutil-home-assistant
|
||||
sqlalchemy
|
||||
]; # missing inputs: youtubeaio
|
||||
youtubeaio
|
||||
];
|
||||
"zabbix" = ps: with ps; [
|
||||
py-zabbix
|
||||
];
|
||||
|
@ -6505,6 +6506,7 @@
|
|||
"yeelight"
|
||||
"yolink"
|
||||
"youless"
|
||||
"youtube"
|
||||
"zamg"
|
||||
"zeroconf"
|
||||
"zerproc"
|
||||
|
|
|
@ -452,6 +452,13 @@ let
|
|||
];
|
||||
});
|
||||
|
||||
youtubeaio = super.youtubeaio.overridePythonAttrs (old: {
|
||||
pytestFlagsArray = [
|
||||
# fails with pydantic v1
|
||||
"--deselect=tests/test_video.py::test_fetch_video"
|
||||
];
|
||||
});
|
||||
|
||||
# internal python packages only consumed by home-assistant itself
|
||||
home-assistant-frontend = self.callPackage ./frontend.nix { };
|
||||
home-assistant-intents = self.callPackage ./intents.nix { };
|
||||
|
|
|
@ -16519,6 +16519,8 @@ self: super: with self; {
|
|||
ffmpegSupport = false;
|
||||
};
|
||||
|
||||
youtubeaio = callPackage ../development/python-modules/youtubeaio { };
|
||||
|
||||
yoyo-migrations = callPackage ../development/python-modules/yoyo-migrations { };
|
||||
|
||||
yt-dlp = callPackage ../tools/misc/yt-dlp {
|
||||
|
|
Loading…
Reference in a new issue