2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, mecab
|
|
|
|
, swig
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2022-12-17 10:02:37 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mecab-python3";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.0.6";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-FvOKzkhAIL00RqEAVIKWeMHnuX8XQLWLAKMdWVz/Al4=";
|
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
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
buildInputs = [
|
|
|
|
mecab
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"MeCab"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A python wrapper for mecab: Morphological Analysis engine";
|
|
|
|
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}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ gpl2 lgpl21 bsd3 ]; # any of the three
|
|
|
|
maintainers = with maintainers; [ ixxie ];
|
|
|
|
};
|
|
|
|
}
|