about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2024-01-18 22:24:57 +0300
committerIzorkin <izorkin@elven.pw>2024-02-17 17:46:33 +0300
commitdf1a3263407a0d46044a778541729cace0002a71 (patch)
treeadac8a4838fb005a4d56ccbb1d6853fe8786b6a4 /pkgs/development
parent3c43b81701e73452df1c080b05770407da9e16d6 (diff)
python3Packages.lexilang: init at 1.0.1
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/lexilang/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/lexilang/default.nix b/pkgs/development/python-modules/lexilang/default.nix
new file mode 100644
index 0000000000000..8577cb5211964
--- /dev/null
+++ b/pkgs/development/python-modules/lexilang/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, setuptools
+, pytestCheckHook
+, python
+}:
+
+buildPythonPackage rec {
+  pname = "lexilang";
+  version = "1.0.1";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "LibreTranslate";
+    repo = "LexiLang";
+    rev = "v${version}";
+    hash = "sha256-TLkaqCE9NDjN2XuYOUkeeWIRcqkxrdg31fS4mEnlcEo=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  checkPhase = ''
+    runHook preCheck
+    ${python.interpreter} test.py
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "Simple, fast dictionary-based language detector for short texts";
+    homepage = "https://github.com/LibreTranslate/LexiLang";
+    license = licenses.agpl3Only;
+    maintainers = with maintainers; [ izorkin ];
+  };
+}