about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/hspell/dicts.nix
blob: 8b629d9b619462f0d311c28f7e92a7f72c7eca6b (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
{ lib, stdenv, hspell }:

let
  dict = variant: a: stdenv.mkDerivation ({
    inherit (hspell) version src patches postPatch nativeBuildInputs;
    buildFlags = [ variant ];

    meta = hspell.meta // {
      broken = true;
      description = "${variant} Hebrew dictionary";
    } // (lib.optionalAttrs (a ? meta) a.meta);
  } // (removeAttrs a ["meta"]));
in
{
  recurseForDerivations = true;

  aspell = dict "aspell" {
    pname = "aspell-dict-he";

    installPhase = ''
      mkdir -p $out/lib/aspell
      cp -v he_affix.dat he.wl $out/lib/aspell'';
  };

  myspell = dict "myspell" {
    pname = "myspell-dict-he";

    installPhase = ''
      mkdir -p $out/lib/myspell
      cp -v he.dic he.aff $out/lib/myspell'';
  };

  hunspell = dict "hunspell" {
    pname = "hunspell-dict-he";

    installPhase = ''
      mkdir -p $out/lib
      cp -rv hunspell $out/lib'';
  };
}