mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
python3Packages.fugashi: init at 1.2.1
Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: OTABI Tomoya <contact@natsukium.com>
This commit is contained in:
parent
bf3b1183bf
commit
89fac5de50
52
pkgs/development/python-modules/fugashi/default.nix
Normal file
52
pkgs/development/python-modules/fugashi/default.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, buildPythonPackage
|
||||
, cython
|
||||
, mecab
|
||||
, setuptools-scm
|
||||
, ipadic
|
||||
, unidic
|
||||
, unidic-lite
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fugashi";
|
||||
version = "1.2.1";
|
||||
format = "setuptools";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "polm";
|
||||
repo = "fugashi";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-VDqRhJiNDbKFE284EAUS0d5T9cl8kgyHjh+r/HjjDY8=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [ cython mecab setuptools-scm ];
|
||||
|
||||
nativeCheckInputs = [ ipadic pytestCheckHook ]
|
||||
++ passthru.optional-dependencies.unidic-lite;
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
unidic-lite = [ unidic-lite ];
|
||||
unidic = [ unidic ];
|
||||
};
|
||||
|
||||
preCheck = ''
|
||||
cd fugashi
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "fugashi" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Cython MeCab wrapper for fast, pythonic Japanese tokenization and morphological analysis";
|
||||
homepage = "https://github.com/polm/fugashi";
|
||||
changelog = "https://github.com/polm/fugashi/releases/tag/${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ laurent-f1z1 ];
|
||||
};
|
||||
}
|
@ -3866,6 +3866,8 @@ self: super: with self; {
|
||||
|
||||
ftputil = callPackage ../development/python-modules/ftputil { };
|
||||
|
||||
fugashi = callPackage ../development/python-modules/fugashi { };
|
||||
|
||||
func-timeout = callPackage ../development/python-modules/func-timeout { };
|
||||
|
||||
funcparserlib = callPackage ../development/python-modules/funcparserlib { };
|
||||
|
Loading…
Reference in New Issue
Block a user