at master 1.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 # build-system 8 hatchling, 9 hatch-vcs, 10 11 # dependencies 12 babelfish, 13 beautifulsoup4, 14 chardet, 15 click, 16 click-option-group, 17 defusedxml, 18 dogpile-cache, 19 enzyme, 20 guessit, 21 knowit, 22 srt, 23 pysubs2, 24 rarfile, 25 requests, 26 platformdirs, 27 stevedore, 28 tomli, 29 tomlkit, 30 31 # nativeCheckInputs 32 colorama, 33 pypandoc, 34 pytestCheckHook, 35 pytest-cov-stub, 36 pytest-xdist, 37 mypy, 38 sympy, 39 vcrpy, 40}: 41 42buildPythonPackage rec { 43 pname = "subliminal"; 44 version = "2.4.0"; 45 pyproject = true; 46 47 disabled = pythonOlder "3.8"; 48 49 src = fetchFromGitHub { 50 owner = "Diaoul"; 51 repo = "subliminal"; 52 tag = version; 53 hash = "sha256-QRxaLJAtI7Xe+3Llp3fJP12KblDJ8+MGNsmKT4t2O0k="; 54 }; 55 56 build-system = [ 57 hatchling 58 hatch-vcs 59 ]; 60 61 propagatedBuildInputs = [ 62 babelfish 63 beautifulsoup4 64 chardet 65 click 66 click-option-group 67 defusedxml 68 dogpile-cache 69 enzyme 70 guessit 71 knowit 72 srt 73 pysubs2 74 rarfile 75 requests 76 platformdirs 77 stevedore 78 tomli 79 tomlkit 80 ]; 81 82 nativeCheckInputs = [ 83 colorama 84 pypandoc 85 pytestCheckHook 86 pytest-cov-stub 87 pytest-xdist 88 mypy 89 sympy 90 vcrpy 91 ]; 92 93 pythonImportsCheck = [ "subliminal" ]; 94 95 disabledTests = [ 96 # Tests require network access 97 "integration" 98 "test_cli_cache" 99 "test_cli_download" 100 "test_is_supported_archive" 101 "test_refine" 102 "test_scan" 103 "test_hash" 104 ]; 105 106 meta = { 107 description = "Python library to search and download subtitles"; 108 mainProgram = "subliminal"; 109 homepage = "https://github.com/Diaoul/subliminal"; 110 changelog = "https://github.com/Diaoul/subliminal/blob/${src.tag}/HISTORY.rst"; 111 license = lib.licenses.mit; 112 maintainers = with lib.maintainers; [ doronbehar ]; 113 }; 114}