mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 05:04:00 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
48 lines
984 B
Nix
48 lines
984 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
|
|
# popular downstream dependencies
|
|
, aiohttp
|
|
, requests
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "charset-normalizer";
|
|
version = "3.0.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Ousret";
|
|
repo = "charset_normalizer";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-2kXs6ZdemA6taV4aa9xBKLmhbSgpybjg3Z61EUFabrk=";
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace " --cov=charset_normalizer --cov-report=term-missing" ""
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"charset_normalizer"
|
|
];
|
|
|
|
passthru.tests = { inherit aiohttp requests; };
|
|
|
|
meta = with lib; {
|
|
description = "Python module for encoding and language detection";
|
|
homepage = "https://charset-normalizer.readthedocs.io/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|