Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

51 lines
1.1 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
isPyPy,
mypy,
pytestCheckHook,
requests,
setuptools,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "charset-normalizer";
version = "3.4.3";
pyproject = true;
src = fetchFromGitHub {
owner = "jawah";
repo = "charset_normalizer";
tag = version;
hash = "sha256-ZEHxBErjjvofqe3rkkgiEuEJcoluwo+2nZrLfrsHn5Q=";
};
build-system = [
setuptools
setuptools-scm
]
++ lib.optional (!isPyPy) mypy;
env.CHARSET_NORMALIZER_USE_MYPYC = lib.optionalString (!isPyPy) "1";
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "charset_normalizer" ];
passthru.tests = {
inherit aiohttp requests;
};
meta = with lib; {
description = "Python module for encoding and language detection";
mainProgram = "normalizer";
homepage = "https://charset-normalizer.readthedocs.io/";
changelog = "https://github.com/jawah/charset_normalizer/blob/${src.tag}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}