summary refs log tree commit diff
path: root/pkgs/development/python-modules/grammalecte/default.nix
blob: 9aa3c4ffd0317b864e1309b4108ea0c789bd7721 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib
, buildPythonPackage
, fetchurl
, bottle
, isPy3k
}:

buildPythonPackage rec {
  pname = "grammalecte";
  version = "2.1.1";

  src = fetchurl {
    url = "https://grammalecte.net/grammalecte/zip/Grammalecte-fr-v${version}.zip";
    sha256 = "076jv3ywdgqqzg92bfbagc7ypy08xjq5zn4vgna6j9350fkfqhzn";
  };

  patchPhase = ''
    runHook prePatch
    substituteInPlace grammalecte-server.py --replace sys.version_info.major sys.version_info
    runHook postPatch
  '';

  propagatedBuildInputs = [ bottle ];

  sourceRoot = ".";

  disabled = !isPy3k;

  meta = {
    description = "An open source grammar and typographic corrector for the French language";
    homepage = "https://grammalecte.net";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ apeyroux ];
  };
}