1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools-scm, 8 9 # dependencies 10 cwcwidth, 11 lxml, 12 13 # tests 14 aeidon, 15 charset-normalizer, 16 cheroot, 17 fluent-syntax, 18 gettext, 19 iniparse, 20 mistletoe, 21 phply, 22 pyparsing, 23 pytestCheckHook, 24 ruamel-yaml, 25 syrupy, 26 vobject, 27}: 28 29buildPythonPackage rec { 30 pname = "translate-toolkit"; 31 version = "3.16.1"; 32 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 owner = "translate"; 37 repo = "translate"; 38 tag = version; 39 hash = "sha256-AEMqnTnnbqNsVQY0eE2ATn2NbV9jVPtfCo3Lve7MEmg="; 40 }; 41 42 build-system = [ setuptools-scm ]; 43 44 dependencies = [ 45 cwcwidth 46 lxml 47 ]; 48 49 nativeCheckInputs = [ 50 aeidon 51 charset-normalizer 52 cheroot 53 fluent-syntax 54 gettext 55 iniparse 56 mistletoe 57 phply 58 pyparsing 59 pytestCheckHook 60 ruamel-yaml 61 syrupy 62 vobject 63 ]; 64 65 disabledTests = [ 66 # Probably breaks because of nix sandbox 67 "test_timezones" 68 69 # Requires network 70 "test_xliff_conformance" 71 ]; 72 73 pythonImportsCheck = [ "translate" ]; 74 75 __darwinAllowLocalNetworking = true; 76 77 meta = { 78 description = "Useful localization tools for building localization & translation systems"; 79 homepage = "https://toolkit.translatehouse.org/"; 80 changelog = "https://docs.translatehouse.org/projects/translate-toolkit/en/latest/releases/${src.tag}.html"; 81 license = lib.licenses.gpl2Plus; 82 maintainers = with lib.maintainers; [ erictapen ]; 83 }; 84}