Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, ncurses, readline, autoreconfHook }:
2
3stdenv.mkDerivation rec {
4 version = "1.7.2";
5 pname = "hunspell";
6
7 src = fetchFromGitHub {
8 owner = "hunspell";
9 repo = "hunspell";
10 rev = "v${version}";
11 sha256 = "sha256-x2FXxnVIqsf5/UEQcvchAndXBv/3mW8Z55djQAFgNA8=";
12 };
13
14 outputs = [ "bin" "dev" "out" "man" ];
15
16 buildInputs = [ ncurses readline ];
17 nativeBuildInputs = [ autoreconfHook ];
18
19 patches = [
20 ./0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
21 ];
22
23 postPatch = ''
24 patchShebangs tests
25 '';
26
27 autoreconfFlags = [ "-vfi" ];
28
29 configureFlags = [ "--with-ui" "--with-readline" ];
30
31 hardeningDisable = [ "format" ];
32
33 meta = with lib; {
34 homepage = "https://hunspell.sourceforge.net";
35 description = "Spell checker";
36 longDescription = ''
37 Hunspell is the spell checker of LibreOffice, OpenOffice.org, Mozilla
38 Firefox 3 & Thunderbird, Google Chrome, and it is also used by
39 proprietary software packages, like macOS, InDesign, memoQ, Opera and
40 SDL Trados.
41
42 Main features:
43
44 * Extended support for language peculiarities; Unicode character encoding, compounding and complex morphology.
45 * Improved suggestion using n-gram similarity, rule and dictionary based pronunciation data.
46 * Morphological analysis, stemming and generation.
47 * Hunspell is based on MySpell and works also with MySpell dictionaries.
48 * C++ library under GPL/LGPL/MPL tri-license.
49 * Interfaces and ports:
50 * Enchant (Generic spelling library from the Abiword project),
51 * XSpell (macOS port, but Hunspell is part of the macOS from version 10.6 (Snow Leopard), and
52 now it is enough to place Hunspell dictionary files into
53 ~/Library/Spelling or /Library/Spelling for spell checking),
54 * Delphi, Java (JNA, JNI), Perl, .NET, Python, Ruby ([1], [2]), UNO.
55 '';
56 platforms = platforms.all;
57 license = with licenses; [ gpl2 lgpl21 mpl11 ];
58 maintainers = with lib.maintainers; [ ];
59 };
60}