about summary refs log tree commit diff
path: root/pkgs/development/python-modules/epitran/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/epitran/default.nix')
-rw-r--r--pkgs/development/python-modules/epitran/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/epitran/default.nix b/pkgs/development/python-modules/epitran/default.nix
new file mode 100644
index 0000000000000..f512ff0d0ccbb
--- /dev/null
+++ b/pkgs/development/python-modules/epitran/default.nix
@@ -0,0 +1,57 @@
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+
+  unittestCheckHook,
+
+  setuptools,
+
+  regex,
+  panphon,
+  marisa-trie,
+  requests,
+}:
+
+buildPythonPackage rec {
+  pname = "epitran";
+  version = "1.24";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "dmort27";
+    repo = "epitran";
+    rev = "refs/tags/${version}";
+    hash = "sha256-AH4q8J5oMaUVJ559qe/ZlJXlCcGdxWnxMhnZKCH5Rlk=";
+  };
+
+  build-system = [ setuptools ];
+
+  dependencies = [
+    regex
+    panphon
+    marisa-trie
+    requests
+  ];
+
+  nativeCheckInputs = [ unittestCheckHook ];
+
+  unittestFlagsArray = [
+    "-s"
+    "test"
+  ];
+
+  pythonImportsCheck = [
+    "epitran"
+    "epitran.backoff"
+    "epitran.vector"
+  ];
+
+  meta = with lib; {
+    description = "Tools for transcribing languages into IPA";
+    homepage = "https://github.com/dmort27/epitran";
+    changelog = "https://github.com/dmort27/epitran/releases/tag/${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ vizid ];
+  };
+}