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