1{ lib 2, buildPythonPackage 3, fetchPypi 4, hypothesis 5, pythonOlder 6, pytestCheckHook 7, setuptools 8}: 9 10buildPythonPackage rec { 11 pname = "chardet"; 12 version = "5.2.0"; 13 format = "pyproject"; 14 disabled = pythonOlder "3.6"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-Gztv9HmoxBS8P6LAhSmVaVxKAm3NbQYzst0JLKOcHPc="; 19 }; 20 21 nativeBuildInputs = [ 22 setuptools 23 ]; 24 25 nativeCheckInputs = [ 26 hypothesis 27 pytestCheckHook 28 ]; 29 30 disabledTests = [ 31 # flaky; https://github.com/chardet/chardet/issues/256 32 "test_detect_all_and_detect_one_should_agree" 33 ]; 34 35 pythonImportsCheck = [ "chardet" ]; 36 37 meta = with lib; { 38 changelog = "https://github.com/chardet/chardet/releases/tag/${version}"; 39 description = "Universal encoding detector"; 40 homepage = "https://github.com/chardet/chardet"; 41 license = licenses.lgpl21Plus; 42 maintainers = with maintainers; [ domenkozar ]; 43 }; 44}