at 24.11-pre 1.2 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 pythonOlder, 5 pytestCheckHook, 6 buildPythonPackage, 7 cython_0, 8 mecab, 9 setuptools-scm, 10 ipadic, 11 unidic, 12 unidic-lite, 13}: 14 15buildPythonPackage rec { 16 pname = "fugashi"; 17 version = "1.3.0"; 18 format = "setuptools"; 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "polm"; 23 repo = "fugashi"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-4i7Q+TtXTQNSJ1EIcS8KHrVPdCJAgZh86Y6lB8772XU="; 26 }; 27 28 nativeBuildInputs = [ 29 cython_0 30 mecab 31 setuptools-scm 32 ]; 33 34 nativeCheckInputs = [ 35 ipadic 36 pytestCheckHook 37 ] ++ passthru.optional-dependencies.unidic-lite; 38 39 passthru.optional-dependencies = { 40 unidic-lite = [ unidic-lite ]; 41 unidic = [ unidic ]; 42 }; 43 44 preCheck = '' 45 cd fugashi 46 ''; 47 48 pythonImportsCheck = [ "fugashi" ]; 49 50 meta = with lib; { 51 description = "A Cython MeCab wrapper for fast, pythonic Japanese tokenization and morphological analysis"; 52 homepage = "https://github.com/polm/fugashi"; 53 changelog = "https://github.com/polm/fugashi/releases/tag/${version}"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ laurent-f1z1 ]; 56 }; 57}