summary refs log tree commit diff
path: root/pkgs/development/libraries/aspell/default.nix
blob: cccd93e5d4ddec3121725acb1680eecc94c57090 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{stdenv, fetchurl, perl
, searchNixProfiles ? true}:

stdenv.mkDerivation rec {
  name = "aspell-0.60.6.1";

  src = fetchurl {
    url = "mirror://gnu/aspell/${name}.tar.gz";
    sha256 = "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm";
  };

  patchPhase = ''
    patch interfaces/cc/aspell.h < ${./clang.patch}
  '' + stdenv.lib.optionalString searchNixProfiles ''
    patch -p1 < ${./data-dirs-from-nix-profiles.patch}
  '';

  nativeBuildInputs = [ perl ];

  doCheck = true;

  preConfigure = ''
    configureFlagsArray=(
      --enable-pkglibdir=$out/lib/aspell
      --enable-pkgdatadir=$out/lib/aspell
    );
  '';

  meta = {
    description = "Spell checker for many languages";
    homepage = http://aspell.net/;
    license = stdenv.lib.licenses.lgpl2Plus;
    maintainers = [ ];
    platforms = with stdenv.lib.platforms; all;
  };
}