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