2020-02-18 14:13:46 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, ncurses, readline, autoreconfHook }:
|
2010-06-30 17:53:28 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-11-19 16:02:38 +01:00
|
|
|
version = "1.7.0";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "hunspell";
|
2010-06-30 17:53:28 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-04-23 04:42:59 +02:00
|
|
|
url = "https://github.com/hunspell/hunspell/archive/v${version}.tar.gz";
|
2018-11-19 16:02:38 +01:00
|
|
|
sha256 = "12mwwqz6qkx7q1lg9vpjiiwh4fk4c8xs6g6g0xa2ia0hp5pbh9xv";
|
2010-06-30 17:53:28 +02:00
|
|
|
};
|
|
|
|
|
2016-08-29 02:30:01 +02:00
|
|
|
outputs = [ "bin" "dev" "out" "man" ];
|
2015-04-19 01:26:19 +02:00
|
|
|
|
|
|
|
buildInputs = [ ncurses readline ];
|
2017-04-23 04:42:59 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2020-02-18 14:13:46 +01:00
|
|
|
patches = [
|
|
|
|
./0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2019-16707.patch";
|
|
|
|
url = "https://github.com/hunspell/hunspell/commit/ac938e2ecb48ab4dd21298126c7921689d60571b.patch";
|
|
|
|
sha256 = "0bwfksz87iy7ikx3fb54zd5ww169qfm9kl076hsch3cs8p30s8az";
|
|
|
|
})
|
|
|
|
];
|
2019-07-24 21:39:46 +02:00
|
|
|
|
2018-08-08 20:35:48 +02:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
2017-04-23 04:42:59 +02:00
|
|
|
autoreconfFlags = "-vfi";
|
|
|
|
|
2015-04-19 01:26:19 +02:00
|
|
|
configureFlags = [ "--with-ui" "--with-readline" ];
|
2010-06-30 17:53:28 +02:00
|
|
|
|
2016-04-05 18:49:28 +02:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2010-06-30 17:53:28 +02:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://hunspell.sourceforge.net";
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Spell checker";
|
2010-06-30 17:53:28 +02:00
|
|
|
longDescription = ''
|
2013-10-06 11:49:53 +02:00
|
|
|
Hunspell is the spell checker of LibreOffice, OpenOffice.org, Mozilla
|
|
|
|
Firefox 3 & Thunderbird, Google Chrome, and it is also used by
|
2017-08-07 00:05:18 +02:00
|
|
|
proprietary software packages, like macOS, InDesign, memoQ, Opera and
|
2013-10-06 11:49:53 +02:00
|
|
|
SDL Trados.
|
|
|
|
|
2010-06-30 17:53:28 +02:00
|
|
|
Main features:
|
2013-10-06 11:49:53 +02:00
|
|
|
|
2010-06-30 17:53:28 +02:00
|
|
|
* Extended support for language peculiarities; Unicode character encoding, compounding and complex morphology.
|
2014-12-30 03:31:03 +01:00
|
|
|
* Improved suggestion using n-gram similarity, rule and dictionary based pronunciation data.
|
2010-06-30 17:53:28 +02:00
|
|
|
* Morphological analysis, stemming and generation.
|
|
|
|
* Hunspell is based on MySpell and works also with MySpell dictionaries.
|
|
|
|
* C++ library under GPL/LGPL/MPL tri-license.
|
|
|
|
* Interfaces and ports:
|
|
|
|
* Enchant (Generic spelling library from the Abiword project),
|
2017-08-07 00:05:18 +02:00
|
|
|
* XSpell (macOS port, but Hunspell is part of the macOS from version 10.6 (Snow Leopard), and
|
2010-06-30 17:53:28 +02:00
|
|
|
now it is enough to place Hunspell dictionary files into
|
|
|
|
~/Library/Spelling or /Library/Spelling for spell checking),
|
|
|
|
* Delphi, Java (JNA, JNI), Perl, .NET, Python, Ruby ([1], [2]), UNO.
|
|
|
|
'';
|
|
|
|
platforms = platforms.all;
|
2018-10-12 23:26:50 +02:00
|
|
|
license = with licenses; [ gpl2 lgpl21 mpl11 ];
|
2019-12-05 08:29:48 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ ];
|
2010-06-30 17:53:28 +02:00
|
|
|
};
|
|
|
|
}
|