1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pytestCheckHook, 7 python, 8}: 9 10buildPythonPackage rec { 11 pname = "lexilang"; 12 version = "1.0.1"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "LibreTranslate"; 17 repo = "LexiLang"; 18 rev = "v${version}"; 19 hash = "sha256-TLkaqCE9NDjN2XuYOUkeeWIRcqkxrdg31fS4mEnlcEo="; 20 }; 21 22 nativeBuildInputs = [ setuptools ]; 23 24 nativeCheckInputs = [ pytestCheckHook ]; 25 26 checkPhase = '' 27 runHook preCheck 28 ${python.interpreter} test.py 29 runHook postCheck 30 ''; 31 32 meta = with lib; { 33 description = "Simple, fast dictionary-based language detector for short texts"; 34 homepage = "https://github.com/LibreTranslate/LexiLang"; 35 license = licenses.agpl3Only; 36 maintainers = with maintainers; [ izorkin ]; 37 }; 38}