Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at master 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 importlib-metadata, 7 natsort, 8 pillow, 9 py7zr, 10 pycountry, 11 pyicu, 12 pytestCheckHook, 13 pythonOlder, 14 rapidfuzz, 15 rarfile, 16 setuptools, 17 setuptools-scm, 18 text2digits, 19 wheel, 20 wordninja, 21}: 22 23buildPythonPackage rec { 24 pname = "comicapi"; 25 version = "3.2.0"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.8"; 29 30 src = fetchFromGitHub { 31 owner = "comictagger"; 32 repo = "comicapi"; 33 rev = "2bf8332114e49add0bbc0fd3d85bdbba02de3d1a"; 34 hash = "sha256-Cd3ILy/4PqWUj1Uu9of9gCpdVp2R6CXjPOuSXgrB894="; 35 }; 36 37 build-system = [ 38 setuptools 39 setuptools-scm 40 wheel 41 ]; 42 43 dependencies = [ 44 importlib-metadata 45 natsort 46 pillow 47 pycountry 48 rapidfuzz 49 text2digits 50 wordninja 51 ]; 52 53 optional-dependencies = { 54 _7z = [ py7zr ]; 55 56 all = [ 57 py7zr 58 rarfile 59 ] 60 ++ lib.optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isLinux) pyicu; 61 62 cbr = [ rarfile ]; 63 64 icu = lib.optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isLinux) pyicu; 65 }; 66 67 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies); 68 69 pythonRelaxDeps = [ "pycountry" ]; 70 71 disabledTests = [ 72 # AssertionError 73 "test_copy_from_archive" 74 ]; 75 76 pythonImportsCheck = [ "comicapi" ]; 77 78 meta = { 79 description = "Comic archive (cbr/cbz/cbt) and metadata utilities"; 80 homepage = "https://github.com/comictagger/comicapi"; 81 license = lib.licenses.asl20; 82 maintainers = with lib.maintainers; [ getchoo ]; 83 }; 84}