2021-04-26 19:14:03 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, hypothesis
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
2023-01-20 10:41:00 +00:00
|
|
|
, setuptools
|
2021-04-26 19:14:03 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chardet";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "5.1.0";
|
|
|
|
format = "pyproject";
|
2021-04-26 19:14:03 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-DWJxK5VrwVT4X7CiZuKjxZE8KWfgA0hwGzJBHW3vMeU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
hypothesis
|
2021-04-26 19:14:03 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
disabledTests = [
|
|
|
|
# flaky; https://github.com/chardet/chardet/issues/256
|
|
|
|
"test_detect_all_and_detect_one_should_agree"
|
|
|
|
];
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
pythonImportsCheck = [ "chardet" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/chardet/chardet/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Universal encoding detector";
|
2021-04-26 19:14:03 +00:00
|
|
|
homepage = "https://github.com/chardet/chardet";
|
|
|
|
license = licenses.lgpl21Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ domenkozar ];
|
|
|
|
};
|
|
|
|
}
|