1{ lib
2, buildPythonPackage
3, fetchPypi
4, hypothesis
5, pythonOlder
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "chardet";
11 version = "5.0.0";
12 disabled = pythonOlder "3.6";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "sha256-A2jfK/14tfwgVyu06bt/tT4sCU9grpmTM56GcdCvuKo=";
17 };
18
19 checkInputs = [
20 hypothesis
21 pytestCheckHook
22 ];
23
24 disabledTests = [
25 # flaky; https://github.com/chardet/chardet/issues/256
26 "test_detect_all_and_detect_one_should_agree"
27 ];
28
29 pythonImportsCheck = [ "chardet" ];
30
31 meta = with lib; {
32 description = "Universal encoding detector";
33 homepage = "https://github.com/chardet/chardet";
34 license = licenses.lgpl21Plus;
35 maintainers = with maintainers; [ domenkozar ];
36 };
37}