1{
2 lib,
3 stdenv,
4 fetchurl,
5 perl,
6 ...
7}:
8
9let
10 version = "2.8.8";
11 folder =
12 with builtins;
13 let
14 parts = splitVersion version;
15 in
16 concatStringsSep "." [
17 (elemAt parts 0)
18 (elemAt parts 1)
19 ];
20in
21stdenv.mkDerivation rec {
22 pname = "hyphen";
23 inherit version;
24
25 nativeBuildInputs = [ perl ];
26
27 src = fetchurl {
28 url = "https://sourceforge.net/projects/hunspell/files/Hyphen/${folder}/${pname}-${version}.tar.gz";
29 sha256 = "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih";
30 };
31
32 # Do not install the en_US dictionary.
33 installPhase = ''
34 runHook preInstall
35 make install-libLTLIBRARIES
36 make install-binSCRIPTS
37 make install-includeHEADERS
38
39 # license
40 install -D -m644 COPYING "$out/share/licenses/${pname}/LICENSE"
41 runHook postInstall
42 '';
43
44 meta = with lib; {
45 description = "Text hyphenation library";
46 mainProgram = "substrings.pl";
47 homepage = "https://sourceforge.net/projects/hunspell/files/Hyphen/";
48 platforms = platforms.all;
49 license = with licenses; [
50 gpl2
51 lgpl21
52 mpl11
53 ];
54 maintainers = with maintainers; [ Br1ght0ne ];
55 };
56}