1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 flit-core,
6 polib,
7 click,
8}:
9
10buildPythonPackage rec {
11 pname = "lingua";
12 version = "4.15.0";
13 format = "pyproject";
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-DhqUZ0HbKIpANhrQT/OP4EvwgZg0uKu4TEtTX+2bpO8=";
18 };
19
20 postPatch = ''
21 substituteInPlace src/lingua/extract.py \
22 --replace-fail SafeConfigParser ConfigParser
23 '';
24
25 nativeBuildInputs = [ flit-core ];
26
27 propagatedBuildInputs = [
28 click
29 polib
30 ];
31
32 pythonImportsCheck = [ "lingua" ];
33
34 meta = with lib; {
35 description = "Translation toolset";
36 homepage = "https://github.com/wichert/lingua";
37 license = licenses.bsd3;
38 maintainers = with maintainers; [ np ];
39 };
40}