depot/third_party/nixpkgs/pkgs/development/python-modules/ssg/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

57 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
python,
unittestCheckHook,
setuptools,
fire,
python-crfsuite,
tqdm,
}:
buildPythonPackage {
pname = "ssg";
version = "0.0.8";
pyproject = true;
src = fetchFromGitHub {
owner = "ponrawee";
repo = "ssg";
rev = "d1b811ef4f8ac08ba1db839f426ba6b6a8e0eb38";
hash = "sha256-GBZzVDDfKOTnbcrIxhFRiNHXN2pSNU3T9RvUytJ068w=";
};
patches = [
(fetchpatch {
name = "fix-deprecation-warnings-and-bump-version";
url = "https://patch-diff.githubusercontent.com/raw/ponrawee/ssg/pull/10.patch";
hash = "sha256-4O1fpI0FBUG/3RN+PAi7I8vpgYmPPL5ZMXhoZUFsQy8=";
})
];
build-system = [ setuptools ];
dependencies = [
fire
python-crfsuite
tqdm
];
nativeCheckInputs = [ unittestCheckHook ];
pythonImportsCheck = [ "ssg" ];
postInstall = "rm -rf $out/${python.sitePackages}/scripts";
meta = with lib; {
description = "TCRF syllable segmenter for Thai";
homepage = "https://github.com/ponrawee/ssg";
license = licenses.asl20;
maintainers = with maintainers; [ vizid ];
mainProgram = "ssg-cli";
};
}