2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, fetchzip, perl
|
2017-11-12 10:15:07 +00:00
|
|
|
, searchNixProfiles ? true
|
|
|
|
}:
|
2007-05-13 14:22:24 +00:00
|
|
|
|
2019-01-01 10:57:40 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
# Source for u-deva.cmap and u-deva.cset: use the Marathi
|
|
|
|
# dictionary like Debian does.
|
2019-01-05 11:59:25 +00:00
|
|
|
devaMapsSource = fetchzip {
|
|
|
|
name = "aspell-u-deva";
|
2020-04-24 14:39:12 +00:00
|
|
|
url = "https://ftp.gnu.org/gnu/aspell/dict/mr/aspell6-mr-0.10-0.tar.bz2";
|
2019-01-01 10:57:40 +00:00
|
|
|
sha256 = "1v8cdl8x2j1d4vbvsq1xrqys69bbccd6mi03fywrhkrrljviyri1";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2009-02-12 19:34:03 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-25 00:13:43 +00:00
|
|
|
pname = "aspell";
|
|
|
|
version = "0.60.8";
|
2011-08-22 17:37:59 +00:00
|
|
|
|
2007-05-13 14:22:24 +00:00
|
|
|
src = fetchurl {
|
2020-04-25 00:13:43 +00:00
|
|
|
url = "mirror://gnu/aspell/aspell-${version}.tar.gz";
|
2019-11-23 23:37:38 +00:00
|
|
|
sha256 = "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr";
|
2007-05-13 14:22:24 +00:00
|
|
|
};
|
2011-08-22 17:37:59 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
patches = lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch;
|
2017-11-12 10:15:07 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2014-08-17 20:17:13 +00:00
|
|
|
patch interfaces/cc/aspell.h < ${./clang.patch}
|
|
|
|
'';
|
|
|
|
|
2020-02-25 00:49:20 +00:00
|
|
|
nativeBuildInputs = [ perl ];
|
2019-11-23 23:37:38 +00:00
|
|
|
buildInputs = [ perl ];
|
2011-08-22 17:37:59 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
2007-05-13 14:22:24 +00:00
|
|
|
|
2014-04-16 17:59:27 +00:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray=(
|
|
|
|
--enable-pkglibdir=$out/lib/aspell
|
|
|
|
--enable-pkgdatadir=$out/lib/aspell
|
|
|
|
);
|
|
|
|
'';
|
|
|
|
|
2019-01-01 10:57:40 +00:00
|
|
|
# Include u-deva.cmap and u-deva.cset in the aspell package
|
|
|
|
# to avoid conflict between 'mr' and 'hi' dictionaries as they
|
|
|
|
# both include those files.
|
|
|
|
postInstall = ''
|
|
|
|
cp ${devaMapsSource}/u-deva.{cmap,cset} $out/lib/aspell/
|
|
|
|
'';
|
|
|
|
|
2007-10-23 16:33:11 +00:00
|
|
|
meta = {
|
2013-10-05 14:22:46 +00:00
|
|
|
description = "Spell checker for many languages";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://aspell.net/";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.lgpl2Plus;
|
2013-08-16 21:44:33 +00:00
|
|
|
maintainers = [ ];
|
2021-01-21 17:00:13 +00:00
|
|
|
platforms = with lib.platforms; all;
|
2007-10-23 16:33:11 +00:00
|
|
|
};
|
2007-05-13 14:22:24 +00:00
|
|
|
}
|