about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorOTABI Tomoya <tomoya.otabi@gmail.com>2024-04-28 20:36:33 +0900
committerGitHub <noreply@github.com>2024-04-28 20:36:33 +0900
commit2eba10a50adf58659a15e23f44dd336077dc7e0a (patch)
treebe8c4ce30cc656a84873ca1b0f81f9ecf483e0cc /pkgs
parent7ceda3c5eb8bf80afeb1a444caa85cfb1f45780b (diff)
parentd6a1db472229b2fdde420a3bf95fd7a4d9b34fb1 (diff)
Merge pull request #294847 from ViZiD/ssg
python312Packages.ssg: init at 0.0.8
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/ssg/default.nix57
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/ssg/default.nix b/pkgs/development/python-modules/ssg/default.nix
new file mode 100644
index 0000000000000..53fbbb0f3868e
--- /dev/null
+++ b/pkgs/development/python-modules/ssg/default.nix
@@ -0,0 +1,57 @@
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  fetchpatch,
+
+  python3,
+  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/${python3.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";
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 018763c063341..f6b5ecbe263fd 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -14432,6 +14432,8 @@ self: super: with self; {
 
   sslib = callPackage ../development/python-modules/sslib { };
 
+  ssg = callPackage ../development/python-modules/ssg { };
+
   stack-data = callPackage ../development/python-modules/stack-data { };
 
   stanio = callPackage ../development/python-modules/stanio { };