summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorLászló Vaskó <laszlo.vasko@outlook.com>2019-02-07 15:15:41 +0100
committerLászló Vaskó <laszlo.vasko@outlook.com>2019-02-07 21:12:31 +0100
commit27e30893609058291e9cda4e088d6a49d324fe72 (patch)
tree4e9e29ff8cb5351ff9b99c7d62f43782cd00972c /pkgs/development/libraries
parent03674f4128547d6a97e2bce840b761a3c62843c8 (diff)
downloadnixpkgs-27e30893609058291e9cda4e088d6a49d324fe72.tar
nixpkgs-27e30893609058291e9cda4e088d6a49d324fe72.tar.gz
nixpkgs-27e30893609058291e9cda4e088d6a49d324fe72.tar.bz2
nixpkgs-27e30893609058291e9cda4e088d6a49d324fe72.tar.lz
nixpkgs-27e30893609058291e9cda4e088d6a49d324fe72.tar.xz
nixpkgs-27e30893609058291e9cda4e088d6a49d324fe72.tar.zst
nixpkgs-27e30893609058291e9cda4e088d6a49d324fe72.zip
hunspell-dicts: add support for Hungarian dictionary
LibreOffice has a comprehensive collection of Hunspell dictionaries.
`mkDictFromLibreOffice` helper is introduced to make it easy to add new
dictionaries from this repository. `license` is parametrized because
each dictionary has its own license.
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/hunspell/dictionaries.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/libraries/hunspell/dictionaries.nix b/pkgs/development/libraries/hunspell/dictionaries.nix
index 836d0128a8c..aeb4253826b 100644
--- a/pkgs/development/libraries/hunspell/dictionaries.nix
+++ b/pkgs/development/libraries/hunspell/dictionaries.nix
@@ -250,6 +250,35 @@ let
       };
     };
 
+  mkDictFromLibreOffice =
+    { shortName
+    , shortDescription
+    , dictFileName
+    , license
+    , readmeFile ? "README_${dictFileName}.txt"
+    , sourceRoot ? dictFileName }:
+    mkDict rec {
+      name = "hunspell-dict-${shortName}-libreoffice-${version}";
+      version = "6.2.0.3";
+      inherit dictFileName readmeFile;
+      src = fetchFromGitHub {
+        owner = "LibreOffice";
+        repo = "dictionaries";
+        rev = "libreoffice-${version}";
+        sha256 = "0rw9ahhynia5wsgyd67lrhinqqn1s1rizgiykb3palbyk0lv72xj";
+      };
+      buildPhase = ''
+        cp -a ${sourceRoot}/* .
+      '';
+      meta = with stdenv.lib; {
+        homepage = https://wiki.documentfoundation.org/Development/Dictionaries;
+        description = "Hunspell dictionary for ${shortDescription} from LibreOffice";
+        license = license;
+        maintainers = with maintainers; [ vlaci ];
+        platforms = platforms.all;
+      };
+    };
+
 in {
 
   /* ENGLISH */
@@ -510,6 +539,15 @@ in {
     ];
   };
 
+  /* HUNGARIAN */
+
+  hu-hu = mkDictFromLibreOffice {
+    shortName = "hu-hu";
+    dictFileName = "hu_HU";
+    shortDescription = "Hungarian (Hungary)";
+    license = with stdenv.lib.licenses; [ mpl20 lgpl3 ];
+  };
+
   /* SWEDISH */
   
   sv-se = mkDictFromDSSO rec {