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