2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchurl,
|
|
|
|
bottle,
|
|
|
|
isPy3k,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "grammalecte";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "2.1.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-26 17:43:05 +00:00
|
|
|
url = "https://grammalecte.net/grammalecte/zip/Grammalecte-fr-v${version}.zip";
|
|
|
|
sha256 = "076jv3ywdgqqzg92bfbagc7ypy08xjq5zn4vgna6j9350fkfqhzn";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
patchPhase = ''
|
|
|
|
runHook prePatch
|
|
|
|
substituteInPlace grammalecte-server.py --replace sys.version_info.major sys.version_info
|
|
|
|
runHook postPatch
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ bottle ];
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
sourceRoot = ".";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
meta = {
|
2021-12-26 17:43:05 +00:00
|
|
|
description = "An open source grammar and typographic corrector for the French language";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://grammalecte.net";
|
2021-12-26 17:43:05 +00:00
|
|
|
license = lib.licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with lib.maintainers; [ apeyroux ];
|
|
|
|
};
|
|
|
|
}
|