Files
nixpkgs/pkgs/development/python-modules/charset-normalizer/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01: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 = {
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 = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}