summaryrefslogtreecommitdiffstats
path: root/pkgs/development/libraries/hyphen/default.nix
blob: 1be6ebb50247158a84fbf1c25d1b7b47d6751501 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  lib,
  stdenv,
  fetchFromGitHub,
  autoreconfHook,
  perl,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "hyphen";
  version = "2.8.9";

  nativeBuildInputs = [
    autoreconfHook
    perl
  ];

  strictDeps = true;

  src = fetchFromGitHub {
    owner = "hunspell";
    repo = "hyphen";
    tag = "v${finalAttrs.version}";
    hash = "sha256-F7PJQjEiE5t5i1gi5B8wzrwAJQl8FWzopRA8uDsaZBc=";
  };

  enableParallelBuilding = true;

  # Do not install the en_US dictionary.
  installPhase = ''
    runHook preInstall
    make install-libLTLIBRARIES
    make install-binSCRIPTS
    make install-includeHEADERS

    # license
    install -D -m644 COPYING "$out/share/licenses/hyphen/LICENSE"
    runHook postInstall
  '';

  meta = {
    changelog = "https://github.com/hunspell/hyphen/blob/${finalAttrs.src.tag}/NEWS";
    description = "Text hyphenation library";
    mainProgram = "substrings.pl";
    homepage = "https://github.com/hunspell/hyphen";
    platforms = lib.platforms.all;
    license = with lib.licenses; [
      gpl2
      lgpl21
      mpl11
    ];
  };
})