summary refs log tree commit diff
path: root/pkgs/development/libraries/hspell/dicts.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/hspell/dicts.nix')
-rw-r--r--pkgs/development/libraries/hspell/dicts.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/libraries/hspell/dicts.nix b/pkgs/development/libraries/hspell/dicts.nix
new file mode 100644
index 0000000000000..a7f0d19865cfc
--- /dev/null
+++ b/pkgs/development/libraries/hspell/dicts.nix
@@ -0,0 +1,43 @@
+{ stdenv, hspell }:
+
+let
+  dict = a: stdenv.mkDerivation ({
+    inherit (hspell) src patchPhase buildNativeInputs;
+    meta = hspell.meta // {
+      description = "${a.buildFlags} Hebrew dictionary";
+    } // (if a ? meta then a.meta else {});
+  } // (removeAttrs a ["meta"]));
+in
+{
+  recurseForDerivations = true;
+
+  aspell = dict {
+    name = "aspell-dict-he-${hspell.version}";
+
+    buildFlags = "aspell";
+
+    installPhase = ''
+      mkdir -p $out/lib/aspell
+      cp -v he_affix.dat he.wl $out/lib/aspell'';
+  };
+
+  myspell = dict {
+    name = "myspell-dict-he-${hspell.version}";
+
+    buildFlags = "myspell";
+
+    installPhase = ''
+      mkdir -p $out/lib/myspell
+      cp -v he.dic he.aff $out/lib/myspell'';
+  };
+
+  hunspell = dict {
+    name = "hunspell-dict-he-${hspell.version}";
+
+    buildFlags = "hunspell";
+
+    installPhase = ''
+      mkdir -p $out/lib
+      cp -rv hunspell $out/lib'';
+  };
+}