Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 pythonOlder, 5 pytestCheckHook, 6 buildPythonPackage, 7 cython, 8 mecab, 9 setuptools-scm, 10 ipadic, 11 unidic, 12 unidic-lite, 13}: 14 15buildPythonPackage rec { 16 pname = "fugashi"; 17 version = "1.5.1"; 18 format = "pyproject"; 19 disabled = pythonOlder "3.9"; 20 21 src = fetchFromGitHub { 22 owner = "polm"; 23 repo = "fugashi"; 24 tag = "v${version}"; 25 hash = "sha256-rkQskRz7lgVBrqBeyj9kWO2/7POrZ0TaM+Z7mhpZLvM="; 26 }; 27 28 nativeBuildInputs = [ 29 cython 30 mecab 31 setuptools-scm 32 ]; 33 34 nativeCheckInputs = [ 35 ipadic 36 pytestCheckHook 37 ] 38 ++ optional-dependencies.unidic-lite; 39 40 optional-dependencies = { 41 unidic-lite = [ unidic-lite ]; 42 unidic = [ unidic ]; 43 }; 44 45 preCheck = '' 46 cd fugashi 47 ''; 48 49 pythonImportsCheck = [ "fugashi" ]; 50 51 meta = with lib; { 52 description = "Cython MeCab wrapper for fast, pythonic Japanese tokenization and morphological analysis"; 53 homepage = "https://github.com/polm/fugashi"; 54 changelog = "https://github.com/polm/fugashi/releases/tag/${version}"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ laurent-f1z1 ]; 57 }; 58}