2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
mecab,
|
|
|
|
swig,
|
|
|
|
setuptools-scm,
|
|
|
|
pythonOlder,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mecab-python3";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.0.9";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-05-15 15:35:15 +00:00
|
|
|
pname = "mecab_python3";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-LYkfSgEZ+3Zvp5bijYgaVXk6DDVE5EbP9k3JRq1yJ8w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
mecab # for mecab-config
|
|
|
|
swig
|
2021-06-04 09:07:49 +00:00
|
|
|
setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ mecab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "MeCab" ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python wrapper for mecab: Morphological Analysis engine";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://github.com/SamuraiT/mecab-python3";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/SamuraiT/mecab-python3/releases/tag/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
gpl2
|
|
|
|
lgpl21
|
|
|
|
bsd3
|
|
|
|
]; # any of the three
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|