2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, iso8601
|
|
|
|
, bottle
|
|
|
|
, pytestCheckHook
|
2023-10-09 19:29:22 +00:00
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "m3u8";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.1.0";
|
|
|
|
pyproject = true;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "globocom";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "m3u8";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-vH5y/fk9dW8w54U3o+70enbTOubV4V0/NVbSSqOY9rQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-05-24 13:37:59 +00:00
|
|
|
iso8601
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
bottle
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_load_should_create_object_from_uri"
|
|
|
|
"test_load_should_create_object_from_uri_with_relative_segments"
|
|
|
|
"test_load_should_remember_redirect"
|
2024-04-21 15:54:59 +00:00
|
|
|
"test_raise_timeout_exception_if_timeout_happens_when_loading_from_uri"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"m3u8"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python m3u8 parser";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/globocom/m3u8";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/globocom/m3u8/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ Scriptkiddi ];
|
|
|
|
};
|
|
|
|
}
|