From df1a3263407a0d46044a778541729cace0002a71 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 18 Jan 2024 22:24:57 +0300 Subject: python3Packages.lexilang: init at 1.0.1 --- .../python-modules/lexilang/default.nix | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/lexilang/default.nix (limited to 'pkgs/development') 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 ]; + }; +} -- cgit 1.4.1