1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build dependencies
8 poetry-core,
9
10 # dependencies
11 appdirs,
12 babelfish,
13 chardet,
14 click,
15 jsonschema,
16 pysrt,
17 pyyaml,
18
19 # tests
20 pytestCheckHook,
21}:
22
23buildPythonPackage rec {
24 pname = "cleanit";
25 version = "0.4.9";
26 pyproject = true;
27
28 disabled = pythonOlder "3.11";
29
30 src = fetchFromGitHub {
31 owner = "ratoaq2";
32 repo = "cleanit";
33 tag = version;
34 hash = "sha256-5fzBcOr6PGp847S7qLsXgYKxPcGW4mM5B5QNBSvH7BM=";
35 };
36
37 build-system = [ poetry-core ];
38
39 dependencies = [
40 appdirs
41 babelfish
42 chardet
43 click
44 jsonschema
45 pysrt
46 pyyaml
47 ];
48
49 pythonRelaxDeps = [
50 "click"
51 "jsonschema"
52 ];
53
54 nativeCheckInputs = [ pytestCheckHook ];
55
56 pythonImportsCheck = [ "cleanit" ];
57
58 meta = {
59 description = "Command line tool that helps you to keep your subtitles clean";
60 homepage = "https://github.com/ratoaq2/cleanit";
61 changelog = "https://github.com/ratoaq2/cleanit/releases/tag/${src.tag}";
62 license = lib.licenses.asl20;
63 maintainers = with lib.maintainers; [ eljamm ];
64 mainProgram = "cleanit";
65 };
66}