Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchurl 4, bottle 5, isPy3k 6}: 7 8buildPythonPackage rec { 9 pname = "grammalecte"; 10 version = "0.5.18"; 11 name = "${pname}-${version}"; 12 13 src = fetchurl { 14 url = "http://www.dicollecte.org/grammalecte/zip/Grammalecte-fr-v${version}.zip"; 15 sha256 = "0izfsqsj8w4awhmwmn4x8wwpqsmqbnfvfafzk93i6yj0l3fn3i97"; 16 }; 17 18 propagatedBuildInputs = [ bottle ]; 19 20 preBuild = "cd .."; 21 postInstall = '' 22 mkdir $out/bin 23 cp $out/cli.py $out/bin/gramalecte 24 cp $out/server.py $out/bin/gramalected 25 chmod a+rx $out/bin/gramalecte 26 chmod a+rx $out/bin/gramalected 27 ''; 28 29 disabled = !isPy3k; 30 31 meta = { 32 description = "Grammalecte is an open source grammar checker for the French language"; 33 homepage = https://dicollecte.org/grammalecte/; 34 license = with lib.licenses; [ gpl3 ]; 35 maintainers = with lib.maintainers; [ apeyroux ]; 36 }; 37}