···
/* hunspell dictionaries */
+
{ stdenv, fetchurl, fetchFromGitHub, unzip, coreutils, bash, which, zip }:
+
{ name, readmeFile, dictFileName, ... }@args:
+
stdenv.mkDerivation (rec {
install -dm755 "$out/share/hunspell"
···
install -dm755 "$out/share/doc"
install -m644 ${readmeFile} $out/share/doc/${name}.txt
+
{ shortName, shortDescription, dictFileName }:
+
name = "hunspell-dict-${shortName}-rla-${version}";
+
readmeFile = "README.txt";
+
src = fetchFromGitHub {
+
sha256 = "0n9ms092k7vg7xpd3ksadxydbrizkb7js7dfxr08nbnnb9fgy0i8";
+
meta = with stdenv.lib; {
+
description = "Hunspell dictionary for ${shortDescription} from rla";
+
homepage = https://github.com/sbosio/rla-es;
+
license = with licenses; [ gpl3 lgpl3 mpl11 ];
+
maintainers = with maintainers; [ renzo ];
+
platforms = platforms.all;
+
phases = "unpackPhase patchPhase buildPhase installPhase";
+
buildInputs = [ bash coreutils unzip which zip ];
+
substituteInPlace ortograf/herramientas/make_dict.sh \
+
--replace /bin/bash bash \
+
--replace /dev/stderr stderr.log
+
substituteInPlace ortograf/herramientas/remover_comentarios.sh \
+
--replace /bin/bash bash \
+
cd ortograf/herramientas
+
bash -x ./make_dict.sh -l ${dictFileName} -2
+
unzip ${dictFileName}.zip \
+
${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
{ shortName, shortDescription, longDescription, dictFileName }:
···
maintainers = with maintainers; [ renzo ];
platforms = platforms.all;
+
buildInputs = [ unzip ];
+
phases = "unpackPhase installPhase";
+
unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
···
maintainers = with maintainers; [ renzo ];
platforms = platforms.all;
+
buildInputs = [ unzip ];
+
phases = "unpackPhase installPhase";
+
unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
+
mkDictFromLinguistico =
{ shortName, shortDescription, dictFileName, src }:
inherit src dictFileName;
···
maintainers = with maintainers; [ renzo ];
platforms = platforms.all;
+
buildInputs = [ unzip ];
+
phases = "unpackPhase patchPhase installPhase";
+
# Fix dic file empty lines (FS#22275)
+
sed '/^\/$/d' -i ${dictFileName}.dic
+
unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
···
+
es-any = mkDictFromRla {
+
shortDescription = "Spanish (any variant)";
+
dictFileName = "es_ANY";
+
es-ar = mkDictFromRla {
+
shortDescription = "Spanish (Argentina)";
+
dictFileName = "es_AR";
+
es-bo = mkDictFromRla {
+
shortDescription = "Spanish (Bolivia)";
+
dictFileName = "es_BO";
+
es-cl = mkDictFromRla {
+
shortDescription = "Spanish (Chile)";
+
dictFileName = "es_CL";
+
es-co = mkDictFromRla {
+
shortDescription = "Spanish (Colombia)";
+
dictFileName = "es_CO";
+
es-cr = mkDictFromRla {
+
shortDescription = "Spanish (Costra Rica)";
+
dictFileName = "es_CR";
+
es-cu = mkDictFromRla {
+
shortDescription = "Spanish (Cuba)";
+
dictFileName = "es_CU";
+
es-do = mkDictFromRla {
+
shortDescription = "Spanish (Dominican Republic)";
+
dictFileName = "es_DO";
+
es-ec = mkDictFromRla {
+
shortDescription = "Spanish (Ecuador)";
+
dictFileName = "es_EC";
+
es-es = mkDictFromRla {
+
shortDescription = "Spanish (Spain)";
+
dictFileName = "es_ES";
+
es-gt = mkDictFromRla {
+
shortDescription = "Spanish (Guatemala)";
+
dictFileName = "es_GT";
+
es-hn = mkDictFromRla {
+
shortDescription = "Spanish (Honduras)";
+
dictFileName = "es_HN";
+
es-mx = mkDictFromRla {
+
shortDescription = "Spanish (Mexico)";
+
dictFileName = "es_MX";
+
es-ni = mkDictFromRla {
+
shortDescription = "Spanish (Nicaragua)";
+
dictFileName = "es_NI";
+
es-pa = mkDictFromRla {
+
shortDescription = "Spanish (Panama)";
+
dictFileName = "es_PA";
+
es-pe = mkDictFromRla {
+
shortDescription = "Spanish (Peru)";
+
dictFileName = "es_PE";
+
es-pr = mkDictFromRla {
+
shortDescription = "Spanish (Puerto Rico)";
+
dictFileName = "es_PR";
+
es-py = mkDictFromRla {
+
shortDescription = "Spanish (Paraguay)";
+
dictFileName = "es_PY";
+
es-sv = mkDictFromRla {
+
shortDescription = "Spanish (El Salvador)";
+
dictFileName = "es_SV";
+
es-uy = mkDictFromRla {
+
shortDescription = "Spanish (Uruguay)";
+
dictFileName = "es_UY";
+
es-ve = mkDictFromRla {
+
shortDescription = "Spanish (Venezuela)";
+
dictFileName = "es_VE";
fr-any = mkDictFromDicollecte {
···
+
it-it = mkDictFromLinguistico rec {
shortDescription = "Hunspell dictionary for 'Italian (Italy)' from Linguistico";