2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
dataclasses-json,
|
|
|
|
isodate,
|
|
|
|
requests,
|
|
|
|
requests-oauthlib,
|
|
|
|
pytestCheckHook,
|
|
|
|
responses,
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-youtube";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.9.4";
|
2023-08-04 22:07:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sns-sdks";
|
|
|
|
repo = "python-youtube";
|
2023-10-19 13:55:26 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-OesJfnXI1w2d5moJyqvrWU3sCxDaqnk1bAhtK6SPjFw=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--cov=pyyoutube" "" \
|
|
|
|
--replace "--cov-report xml" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dataclasses-json
|
|
|
|
isodate
|
|
|
|
requests
|
|
|
|
requests-oauthlib
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyyoutube" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple Python wrapper around for YouTube Data API";
|
2023-08-04 22:07:22 +00:00
|
|
|
homepage = "https://github.com/sns-sdks/python-youtube";
|
|
|
|
changelog = "https://github.com/sns-sdks/python-youtube/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ blaggacao ];
|
|
|
|
};
|
|
|
|
}
|