1{
2 lib,
3 buildPythonPackage,
4 fetchurl,
5 bottle,
6 isPy3k,
7}:
8
9buildPythonPackage rec {
10 pname = "grammalecte";
11 version = "2.1.1";
12 format = "setuptools";
13
14 src = fetchurl {
15 url = "https://grammalecte.net/grammalecte/zip/Grammalecte-fr-v${version}.zip";
16 sha256 = "076jv3ywdgqqzg92bfbagc7ypy08xjq5zn4vgna6j9350fkfqhzn";
17 };
18
19 patchPhase = ''
20 runHook prePatch
21 substituteInPlace grammalecte-server.py --replace sys.version_info.major sys.version_info
22 runHook postPatch
23 '';
24
25 propagatedBuildInputs = [ bottle ];
26
27 sourceRoot = ".";
28
29 disabled = !isPy3k;
30
31 meta = {
32 description = "Open source grammar and typographic corrector for the French language";
33 homepage = "https://grammalecte.net";
34 license = lib.licenses.gpl3Only;
35 maintainers = with lib.maintainers; [ apeyroux ];
36 };
37}