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