1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchPypi,
6}:
7
8buildPythonPackage rec {
9 pname = "ltpycld2";
10 version = "0.42";
11
12 format = "setuptools";
13
14 src = fetchPypi {
15 pname = "LTpycld2";
16 inherit version;
17 sha256 = "948d0c1ab5518ab4efcbcc3cd73bb29f809f1dfb30f4d2fbd81b175a1ffeb516";
18 };
19
20 doCheck = false; # completely broken tests
21
22 pythonImportsCheck = [ "pycld2" ];
23
24 # Fix build with gcc14
25 # https://github.com/aboSamoor/pycld2/pull/62
26 env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
27
28 meta = {
29 description = "Python bindings around Google Chromium's embedded compact language detection library (CLD2)";
30 homepage = "https://github.com/LibreTranslate/pycld2";
31 license = lib.licenses.asl20;
32 maintainers = with lib.maintainers; [ misuzu ];
33 };
34}