2022-09-30 11:47:45 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ncurses, readline, autoreconfHook }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "1.7.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "hunspell";
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hunspell";
|
|
|
|
repo = "hunspell";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-YSJztik0QTZFNR8k8Xu1hakyE16NziDavYVkEUCbtGM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "man" ];
|
|
|
|
|
|
|
|
buildInputs = [ ncurses readline ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
autoreconfFlags = [ "-vfi" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [ "--with-ui" "--with-readline" ];
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://hunspell.sourceforge.net";
|
|
|
|
description = "Spell checker";
|
|
|
|
longDescription = ''
|
|
|
|
Hunspell is the spell checker of LibreOffice, OpenOffice.org, Mozilla
|
|
|
|
Firefox 3 & Thunderbird, Google Chrome, and it is also used by
|
|
|
|
proprietary software packages, like macOS, InDesign, memoQ, Opera and
|
|
|
|
SDL Trados.
|
|
|
|
|
|
|
|
Main features:
|
|
|
|
|
|
|
|
* Extended support for language peculiarities; Unicode character encoding, compounding and complex morphology.
|
|
|
|
* Improved suggestion using n-gram similarity, rule and dictionary based pronunciation data.
|
|
|
|
* 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),
|
|
|
|
* XSpell (macOS port, but Hunspell is part of the macOS from version 10.6 (Snow Leopard), and
|
|
|
|
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;
|
|
|
|
license = with licenses; [ gpl2 lgpl21 mpl11 ];
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|