Files
nixpkgs/pkgs/development/python-modules/jieba/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

39 lines
838 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
python,
isPy3k,
}:
buildPythonPackage rec {
pname = "jieba";
version = "0.42.1";
format = "setuptools";
# no tests in PyPI tarball
src = fetchFromGitHub {
owner = "fxsjy";
repo = "jieba";
rev = "v${version}";
sha256 = "028vmd6sj6wn9l1ilw7qfmlpyiysnlzdgdlhwxs6j4fvq0gyrwxk";
};
# UnicodeEncodeError
doCheck = isPy3k;
# Citing https://github.com/fxsjy/jieba/issues/384: "testcases is in a mess"
# So just picking random ones that currently work
checkPhase = ''
${python.interpreter} test/test.py
${python.interpreter} test/test_tokenize.py
'';
meta = {
description = "Chinese Words Segementation Utilities";
homepage = "https://github.com/fxsjy/jieba";
license = lib.licenses.mit;
teams = [ lib.teams.tts ];
};
}