36 lines
779 B
Nix
36 lines
779 B
Nix
|
{ lib
|
||
|
, buildPythonPackage
|
||
|
, fetchFromGitHub
|
||
|
, pytestCheckHook
|
||
|
}:
|
||
|
|
||
|
buildPythonPackage rec {
|
||
|
pname = "charset-normalizer";
|
||
|
version = "2.0.1";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "Ousret";
|
||
|
repo = "charset_normalizer";
|
||
|
rev = version;
|
||
|
sha256 = "04rnyrqay11kma9pzagi1mzhc0sq37ggpv39kad2d4ynm35v2hfq";
|
||
|
};
|
||
|
|
||
|
checkInputs = [
|
||
|
pytestCheckHook
|
||
|
];
|
||
|
|
||
|
postPatch = ''
|
||
|
substituteInPlace setup.cfg \
|
||
|
--replace " --cov=charset_normalizer --cov-report=term-missing" ""
|
||
|
'';
|
||
|
|
||
|
pythonImportsCheck = [ "charset_normalizer" ];
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "Python module for encoding and language detection";
|
||
|
homepage = "https://charset-normalizer.readthedocs.io/";
|
||
|
license = licenses.mit;
|
||
|
maintainers = with maintainers; [ fab ];
|
||
|
};
|
||
|
}
|