2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cython
|
|
|
|
, pkgconfig
|
|
|
|
, setuptools
|
|
|
|
, wheel
|
|
|
|
, pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
, python
|
2023-03-04 12:14:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "faust-cchardet";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2.1.19";
|
2023-03-04 12:14:45 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "faust-streaming";
|
|
|
|
repo = "cChardet";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
fetchSubmodules = true;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-yY6YEhXC4S47rxnkKAta4m16IVGn7gkHSt056bYOYJ4=";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
pkgconfig
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postFixup = ''
|
|
|
|
# fake cchardet distinfo, so packages that depend on cchardet
|
|
|
|
# accept it as a drop-in replacement
|
|
|
|
ln -s $out/${python.sitePackages}/{faust_,}cchardet-${version}.dist-info
|
|
|
|
'';
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"cchardet"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/faust-streaming/cChardet/blob/${src.rev}/CHANGES.rst";
|
|
|
|
description = "High-speed universal character encoding detector";
|
|
|
|
homepage = "https://github.com/faust-streaming/cChardet";
|
|
|
|
license = lib.licenses.mpl11;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ivan ];
|
|
|
|
};
|
|
|
|
}
|