forked from mirrors/nixpkgs
Hunspell support for Central Thai (th-TH)
This commit is contained in:
parent
41513de1fd
commit
30255e685b
|
@ -5,25 +5,25 @@
|
|||
|
||||
let
|
||||
mkDict =
|
||||
{ pname, readmeFile, dictFileName, ... }@args:
|
||||
stdenv.mkDerivation ({
|
||||
inherit pname;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
# hunspell dicts
|
||||
install -dm755 "$out/share/hunspell"
|
||||
install -m644 ${dictFileName}.dic "$out/share/hunspell/"
|
||||
install -m644 ${dictFileName}.aff "$out/share/hunspell/"
|
||||
# myspell dicts symlinks
|
||||
install -dm755 "$out/share/myspell/dicts"
|
||||
ln -sv "$out/share/hunspell/${dictFileName}.dic" "$out/share/myspell/dicts/"
|
||||
ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/"
|
||||
# docs
|
||||
install -dm755 "$out/share/doc"
|
||||
install -m644 ${readmeFile} $out/share/doc/${pname}.txt
|
||||
runHook postInstall
|
||||
'';
|
||||
} // args);
|
||||
{ pname, readmeFile, dictFileName, ... }@args:
|
||||
stdenv.mkDerivation ({
|
||||
inherit pname;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
# hunspell dicts
|
||||
install -dm755 "$out/share/hunspell"
|
||||
install -m644 ${dictFileName}.dic "$out/share/hunspell/"
|
||||
install -m644 ${dictFileName}.aff "$out/share/hunspell/"
|
||||
# myspell dicts symlinks
|
||||
install -dm755 "$out/share/myspell/dicts"
|
||||
ln -sv "$out/share/hunspell/${dictFileName}.dic" "$out/share/myspell/dicts/"
|
||||
ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/"
|
||||
# docs
|
||||
install -dm755 "$out/share/doc"
|
||||
install -m644 ${readmeFile} $out/share/doc/${pname}.txt
|
||||
runHook postInstall
|
||||
'';
|
||||
} // args);
|
||||
|
||||
mkDictFromRla =
|
||||
{ shortName, shortDescription, dictFileName }:
|
||||
|
@ -79,9 +79,9 @@ let
|
|||
};
|
||||
meta = with lib; {
|
||||
longDescription = ''
|
||||
Svensk ordlista baserad på DSSO (den stora svenska ordlistan) och Göran
|
||||
Anderssons (goran@init.se) arbete med denna. Ordlistan hämtas från
|
||||
LibreOffice då dsso.se inte längre verkar vara med oss.
|
||||
Svensk ordlista baserad på DSSO (den stora svenska ordlistan) och Göran
|
||||
Anderssons (goran@init.se) arbete med denna. Ordlistan hämtas från
|
||||
LibreOffice då dsso.se inte längre verkar vara med oss.
|
||||
'';
|
||||
description = "Hunspell dictionary for ${shortDescription} from LibreOffice";
|
||||
license = licenses.lgpl3;
|
||||
|
@ -90,7 +90,7 @@ let
|
|||
nativeBuildInputs = [ unzip ];
|
||||
sourceRoot = ".";
|
||||
unpackCmd = ''
|
||||
unzip $src dictionaries/${dictFileName}.dic dictionaries/${dictFileName}.aff $readmeFile
|
||||
unzip $src dictionaries/${dictFileName}.dic dictionaries/${dictFileName}.aff $readmeFile
|
||||
'';
|
||||
installPhase = ''
|
||||
# hunspell dicts
|
||||
|
@ -115,8 +115,8 @@ let
|
|||
pname = "hunspell-dict-${shortName}-dicollecte";
|
||||
readmeFile = "README_dict_fr.txt";
|
||||
src = fetchurl {
|
||||
url = "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v${version}.zip";
|
||||
sha256 = "0ca7084jm7zb1ikwzh1frvpb97jn27i7a5d48288h2qlfp068ik0";
|
||||
url = "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v${version}.zip";
|
||||
sha256 = "0ca7084jm7zb1ikwzh1frvpb97jn27i7a5d48288h2qlfp068ik0";
|
||||
};
|
||||
meta = with lib; {
|
||||
inherit longDescription;
|
||||
|
@ -266,7 +266,8 @@ let
|
|||
, dictFileName
|
||||
, license
|
||||
, readmeFile ? "README_${dictFileName}.txt"
|
||||
, sourceRoot ? dictFileName }:
|
||||
, sourceRoot ? dictFileName
|
||||
}:
|
||||
mkDict rec {
|
||||
pname = "hunspell-dict-${shortName}-libreoffice";
|
||||
version = "6.3.0.4";
|
||||
|
@ -289,7 +290,8 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
in rec {
|
||||
in
|
||||
rec {
|
||||
|
||||
/* ENGLISH */
|
||||
|
||||
|
@ -598,7 +600,7 @@ in rec {
|
|||
/* ITALIAN */
|
||||
|
||||
it_IT = it-it;
|
||||
it-it = mkDictFromLinguistico {
|
||||
it-it = mkDictFromLinguistico {
|
||||
shortName = "it-it";
|
||||
dictFileName = "it_IT";
|
||||
shortDescription = "Hunspell dictionary for 'Italian (Italy)' from Linguistico";
|
||||
|
@ -821,4 +823,27 @@ in rec {
|
|||
readmeFile = "README_he_IL.txt";
|
||||
license = with lib.licenses; [ agpl3Plus ];
|
||||
};
|
||||
|
||||
/* THAI */
|
||||
|
||||
th_TH = th-th;
|
||||
th-th = mkDict {
|
||||
pname = "hunspell-dict-th-th";
|
||||
version = "experimental-2021-12-20";
|
||||
dictFileName = "th_TH";
|
||||
readmeFile = "README.md";
|
||||
src = fetchFromGitHub {
|
||||
owner = "SyafiqHadzir";
|
||||
repo = "Hunspell-TH";
|
||||
rev = "f119e58e5f6954965d6abd683e7d4c4b9be2684f";
|
||||
sha256 = "sha256-hwqKvuLxbtzxfyQ5YhC/sdb3QQwxCfzgDOHeatxDjxM=";
|
||||
};
|
||||
meta = with lib; {
|
||||
description = "Hunspell dictionary for Central Thai (Thailand)";
|
||||
homepage = "https://github.com/SyafiqHadzir/Hunspell-TH";
|
||||
license = with licenses; [ gpl3 ];
|
||||
maintainers = with maintainers; [ toastal ]; # looking for a native speaker
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue