summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/nu/nuspell/wrapper.nix
blob: 07d0dd104bf11d9e337db93a5fd710514b836926 (plain)
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
{
  lib,
  buildEnv,
  nuspell,
  hunspellDicts,
  makeBinaryWrapper,
}:

lib.makeOverridable (
  dicts: f:
  buildEnv {
    inherit (lib.appendToName "with-dicts" nuspell) name version;

    paths = f dicts;

    pathsToLink = [ "/share/hunspell" ];

    nativeBuildInputs = [ makeBinaryWrapper ];

    postBuild = ''
      makeWrapper ${lib.getExe nuspell} $out/bin/nuspell \
        --prefix DICPATH : $out/share/hunspell
    '';

    meta = {
      inherit (nuspell.meta)
        description
        longDescription
        homepage
        changelog
        license
        maintainers
        mainProgram
        platforms
        ;
    };
  }
) hunspellDicts