Merge: matrix-synapse: 1.122.0 -> 1.123.0 (#378018)
[NixPkgs.git] / pkgs / development / python-modules / faust-cchardet / default.nix
blobe133516291fbb789a1a152940fcf88064a5becc2
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   cython,
6   pkgconfig,
7   setuptools,
8   wheel,
9   pytestCheckHook,
10   python,
13 buildPythonPackage rec {
14   pname = "faust-cchardet";
15   version = "2.1.19";
16   format = "pyproject";
18   src = fetchFromGitHub {
19     owner = "faust-streaming";
20     repo = "cChardet";
21     tag = "v${version}";
22     fetchSubmodules = true;
23     hash = "sha256-yY6YEhXC4S47rxnkKAta4m16IVGn7gkHSt056bYOYJ4=";
24   };
26   nativeBuildInputs = [
27     cython
28     pkgconfig
29     setuptools
30     wheel
31   ];
33   postFixup = ''
34     # fake cchardet distinfo, so packages that depend on cchardet
35     # accept it as a drop-in replacement
36     ln -s $out/${python.sitePackages}/{faust_,}cchardet-${version}.dist-info
37   '';
39   pythonImportsCheck = [ "cchardet" ];
41   nativeCheckInputs = [ pytestCheckHook ];
43   meta = {
44     changelog = "https://github.com/faust-streaming/cChardet/blob/${src.rev}/CHANGES.rst";
45     description = "High-speed universal character encoding detector";
46     mainProgram = "cchardetect";
47     homepage = "https://github.com/faust-streaming/cChardet";
48     license = lib.licenses.mpl11;
49     maintainers = with lib.maintainers; [
50       dotlambda
51       ivan
52     ];
53   };