1 { lib, stdenv, fetchurl, fetchzip, perl, ncurses
4 , aspell, glibc, runCommand
6 , searchNixProfiles ? true
11 # Source for u-deva.cmap and u-deva.cset: use the Marathi
12 # dictionary like Debian does.
13 devaMapsSource = fetchzip {
14 name = "aspell-u-deva";
15 url = "https://ftp.gnu.org/gnu/aspell/dict/mr/aspell6-mr-0.10-0.tar.bz2";
16 sha256 = "1v8cdl8x2j1d4vbvsq1xrqys69bbccd6mi03fywrhkrrljviyri1";
21 stdenv.mkDerivation rec {
26 url = "mirror://gnu/aspell/aspell-${version}.tar.gz";
27 hash = "sha256-1toSs01C1Ff6YE5DWtSEp0su/80SD/QKzWuz+yiH0hs=";
30 patches = lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch;
33 patch interfaces/cc/aspell.h < ${./clang.patch}
36 nativeBuildInputs = [ perl ];
37 buildInputs = [ ncurses perl ];
43 --enable-pkglibdir=$out/lib/aspell
44 --enable-pkgdatadir=$out/lib/aspell
48 # Include u-deva.cmap and u-deva.cset in the aspell package
49 # to avoid conflict between 'mr' and 'hi' dictionaries as they
50 # both include those files.
52 cp ${devaMapsSource}/u-deva.{cmap,cset} $out/lib/aspell/
56 uses-curses = runCommand "${pname}-curses" {
57 buildInputs = [ glibc ];
59 if ! ldd ${aspell}/bin/aspell | grep -q ${ncurses}
61 echo "Test failure: It does not look like aspell picked up the curses dependency."
69 description = "Spell checker for many languages";
70 homepage = "http://aspell.net/";
71 license = lib.licenses.lgpl2Plus;
73 platforms = with lib.platforms; all;