nixpkgs/pkgs/development/python-modules/faust-cchardet/default.nix
Martin Weinelt 2d5301979d
python310Packages.faust-cchardet: Fake cchardet dist-info
To allow using faust-cchardet as a drop-in replacement, when cchardet
is pinned. Fixes e.g. appdaemon.
2023-03-07 21:14:58 +00:00

55 lines
1.1 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, cython
, pkgconfig
, setuptools
, wheel
, pytestCheckHook
, python
}:
buildPythonPackage rec {
pname = "faust-cchardet";
version = "2.1.18";
format = "pyproject";
src = fetchFromGitHub {
owner = "faust-streaming";
repo = "cChardet";
rev = "refs/tags/v${version}";
fetchSubmodules = true;
hash = "sha256-jTOqxBss/FAb8nMkU62H6O4ysmirD2FTA9mtvxXh43k=";
};
nativeBuildInputs = [
cython
pkgconfig
setuptools
wheel
];
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
'';
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 ];
};
}