nixpkgs/pkgs/development/python-modules/chardet/default.nix
2026-05-26 14:54:09 -07:00

52 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatch-vcs,
hatchling,
hypothesis,
pytest-timeout,
pytest-xdist,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "chardet";
version = "6.0.0.post1";
pyproject = true;
src = fetchFromGitHub {
owner = "chardet";
repo = "chardet";
tag = finalAttrs.version;
hash = "sha256-7G998L4VRvNiGBBNAxPJB27lI2DtL1lTteowUH2NBDk=";
};
build-system = [
hatch-vcs
hatchling
];
nativeCheckInputs = [
hypothesis
pytest-timeout
pytest-xdist
pytestCheckHook
];
disabledTests = [
# flaky; https://github.com/chardet/chardet/issues/256
"test_detect_all_and_detect_one_should_agree"
];
pythonImportsCheck = [ "chardet" ];
meta = {
changelog = "https://github.com/chardet/chardet/releases/tag/${finalAttrs.src.tag}";
description = "Universal encoding detector";
mainProgram = "chardetect";
homepage = "https://github.com/chardet/chardet";
license = lib.licenses.lgpl21Plus;
maintainers = [ ];
};
})