at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 7 python, 8 unittestCheckHook, 9 setuptools, 10 11 fire, 12 python-crfsuite, 13 tqdm, 14}: 15 16buildPythonPackage { 17 pname = "ssg"; 18 version = "0.0.8"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "ponrawee"; 23 repo = "ssg"; 24 rev = "d1b811ef4f8ac08ba1db839f426ba6b6a8e0eb38"; 25 hash = "sha256-GBZzVDDfKOTnbcrIxhFRiNHXN2pSNU3T9RvUytJ068w="; 26 }; 27 28 patches = [ 29 (fetchpatch { 30 name = "fix-deprecation-warnings-and-bump-version"; 31 url = "https://patch-diff.githubusercontent.com/raw/ponrawee/ssg/pull/10.patch"; 32 hash = "sha256-4O1fpI0FBUG/3RN+PAi7I8vpgYmPPL5ZMXhoZUFsQy8="; 33 }) 34 ]; 35 36 build-system = [ setuptools ]; 37 38 dependencies = [ 39 fire 40 python-crfsuite 41 tqdm 42 ]; 43 44 nativeCheckInputs = [ unittestCheckHook ]; 45 46 pythonImportsCheck = [ "ssg" ]; 47 48 postInstall = "rm -rf $out/${python.sitePackages}/scripts"; 49 50 meta = with lib; { 51 description = "TCRF syllable segmenter for Thai"; 52 homepage = "https://github.com/ponrawee/ssg"; 53 license = licenses.asl20; 54 maintainers = with maintainers; [ vizid ]; 55 mainProgram = "ssg-cli"; 56 }; 57}