1{ 2 lib, 3 aiohttp, 4 buildPythonPackage, 5 fetchFromGitHub, 6 mypy, 7 pytestCheckHook, 8 requests, 9 setuptools, 10 setuptools-scm, 11}: 12 13buildPythonPackage rec { 14 pname = "charset-normalizer"; 15 version = "3.4.3"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "jawah"; 20 repo = "charset_normalizer"; 21 tag = version; 22 hash = "sha256-ZEHxBErjjvofqe3rkkgiEuEJcoluwo+2nZrLfrsHn5Q="; 23 }; 24 25 build-system = [ 26 mypy 27 setuptools 28 setuptools-scm 29 ]; 30 31 env.CHARSET_NORMALIZER_USE_MYPYC = "1"; 32 33 nativeCheckInputs = [ pytestCheckHook ]; 34 35 pythonImportsCheck = [ "charset_normalizer" ]; 36 37 passthru.tests = { 38 inherit aiohttp requests; 39 }; 40 41 meta = with lib; { 42 description = "Python module for encoding and language detection"; 43 mainProgram = "normalizer"; 44 homepage = "https://charset-normalizer.readthedocs.io/"; 45 changelog = "https://github.com/jawah/charset_normalizer/blob/${src.tag}/CHANGELOG.md"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}