nixpkgs/pkgs/development/python-modules/wordfreq/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
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.
2023-01-21 12:00:00 +00:00

53 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, regex
, langcodes
, ftfy
, msgpack
, mecab-python3
, jieba
, pytestCheckHook
, isPy27
, fetchFromGitHub
}:
buildPythonPackage rec {
pname = "wordfreq";
version = "3.0.2";
disabled = isPy27;
src = fetchFromGitHub {
owner = "LuminosoInsight";
repo = "wordfreq";
rev = "refs/tags/v${version}";
sha256 = "sha256-ANOBbQWLB35Vz6oil6QZDpsNpKHeKUJnDKA5Q9JRVdE=";
};
propagatedBuildInputs = [
regex
langcodes
ftfy
msgpack
mecab-python3
jieba
];
postPatch = ''
substituteInPlace setup.py --replace "regex ==" "regex >="
'';
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# These languages require additional dictionaries that aren't packaged
"test_languages"
"test_japanese"
"test_korean"
];
meta = with lib; {
description = "A library for looking up the frequencies of words in many languages, based on many sources of data";
homepage = "https://github.com/LuminosoInsight/wordfreq/";
license = licenses.mit;
maintainers = with maintainers; [ ixxie ];
};
}