summary refs log tree commit diff
path: root/pkgs/development/libraries/hspell/dicts.nix
blob: ec6b304dc3cef80adb1df7a1189e6e656400c27f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ stdenv, hspell }:

let
  dict = a: stdenv.mkDerivation ({
    inherit (hspell) src patchPhase nativeBuildInputs;
    meta = hspell.meta // {
      broken = true;
      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'';
  };
}