2007-10-23 17:33:11 +01:00
|
|
|
{stdenv, fetchurl, perl}:
|
2007-05-13 15:22:24 +01:00
|
|
|
|
2009-02-12 19:34:03 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2011-08-22 18:37:59 +01:00
|
|
|
name = "aspell-0.60.6.1";
|
|
|
|
|
2007-05-13 15:22:24 +01:00
|
|
|
src = fetchurl {
|
2013-07-14 03:23:06 +01:00
|
|
|
url = "mirror://gnu/aspell/${name}.tar.gz";
|
2011-08-22 18:37:59 +01:00
|
|
|
sha256 = "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm";
|
2007-05-13 15:22:24 +01:00
|
|
|
};
|
2011-08-22 18:37:59 +01:00
|
|
|
|
2014-08-17 21:17:13 +01:00
|
|
|
patchPhase = ''
|
|
|
|
patch interfaces/cc/aspell.h < ${./clang.patch}
|
|
|
|
'';
|
|
|
|
|
2011-08-22 18:37:59 +01:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
|
|
|
doCheck = true;
|
2007-05-13 15:22:24 +01:00
|
|
|
|
2014-04-16 18:59:27 +01:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray=(
|
|
|
|
--enable-pkglibdir=$out/lib/aspell
|
|
|
|
--enable-pkgdatadir=$out/lib/aspell
|
|
|
|
);
|
|
|
|
'';
|
|
|
|
|
2017-03-28 22:56:12 +01:00
|
|
|
postInstall = ''
|
|
|
|
local prog="$out/bin/aspell"
|
|
|
|
local hidden="$out/bin/.aspell-wrapped"
|
|
|
|
mv "$prog" "$hidden"
|
|
|
|
cat > "$prog" <<END
|
|
|
|
#! $SHELL -e
|
|
|
|
if [ -z "\$ASPELL_CONF" ]; then
|
|
|
|
for p in \$NIX_PROFILES; do
|
2017-04-19 19:19:56 +01:00
|
|
|
if [ -d "\$p/lib/aspell" ]; then
|
2017-03-28 22:56:12 +01:00
|
|
|
ASPELL_CONF="data-dir \$p/lib/aspell"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ -z "\$ASPELL_CONF" ] && [ -d "\$HOME/.nix-profile/lib/aspell" ]; then
|
|
|
|
ASPELL_CONF="data-dir \$HOME/.nix-profile/lib/aspell"
|
|
|
|
fi
|
|
|
|
export ASPELL_CONF
|
|
|
|
fi
|
|
|
|
exec "$hidden" "\$@"
|
|
|
|
END
|
|
|
|
chmod +x "$prog"
|
|
|
|
'';
|
2007-10-23 17:33:11 +01:00
|
|
|
|
|
|
|
meta = {
|
2013-10-05 15:22:46 +01:00
|
|
|
description = "Spell checker for many languages";
|
2007-10-23 17:33:11 +01:00
|
|
|
homepage = http://aspell.net/;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl2Plus;
|
2013-08-16 22:44:33 +01:00
|
|
|
maintainers = [ ];
|
2014-10-27 17:52:28 +00:00
|
|
|
platforms = with stdenv.lib.platforms; all;
|
2007-10-23 17:33:11 +01:00
|
|
|
};
|
2007-05-13 15:22:24 +01:00
|
|
|
}
|