1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 beautifulsoup4,
7 lxml,
8 cssutils,
9 nltk,
10 pytest-lazy-fixture,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "pycaption";
16 version = "2.2.18";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "pbs";
21 repo = "pycaption";
22 tag = version;
23 hash = "sha256-7XI7vZiFNIvRD1enXC7SffqGIRMX6lPfcioLPJuszEk=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 beautifulsoup4
30 lxml
31 cssutils
32 ];
33
34 optional-dependencies = {
35 transcript = [ nltk ];
36 };
37
38 nativeCheckInputs = [
39 pytest-lazy-fixture
40 pytestCheckHook
41 ];
42
43 meta = {
44 changelog = "https://github.com/pbs/pycaption/blob/${src.tag}/docs/changelog.rst";
45 description = "Closed caption converter";
46 homepage = "https://github.com/pbs/pycaption";
47 license = lib.licenses.asl20;
48 maintainers = with lib.maintainers; [ dotlambda ];
49 };
50}