From 3925367ca2b10c44615d625f6412be362619a0e8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 14 Feb 2008 09:40:28 +0000 Subject: Aspell: Use the `ASPELL_CONF' environment variable instead of patching Aspell. A related change in `/etc/profile' will be checked in in the NixOS repository. svn path=/nixpkgs/trunk/; revision=10672 --- pkgs/development/libraries/aspell/default.nix | 14 +++++------ pkgs/development/libraries/aspell/dict-path.patch | 30 ----------------------- 2 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 pkgs/development/libraries/aspell/dict-path.patch (limited to 'pkgs/development/libraries/aspell') diff --git a/pkgs/development/libraries/aspell/default.nix b/pkgs/development/libraries/aspell/default.nix index fdee610771631..baa95da785b70 100644 --- a/pkgs/development/libraries/aspell/default.nix +++ b/pkgs/development/libraries/aspell/default.nix @@ -10,15 +10,15 @@ stdenv.mkDerivation { buildInputs = [perl]; - patches = [ - # A patch that allows additional dictionary directories to be set - # specified through the environment variable - # ASPELL_EXTRA_DICT_DIRS (comma-separated). - ./dict-path.patch - ]; + # Note: Users should define the `ASPELL_CONF' environment variable to + # `dict-dir $HOME/.nix-profile/lib/aspell/' so that they can access + # dictionaries installed in their profile. + # + # We can't use `$out/etc/aspell.conf' for that purpose since Aspell + # doesn't expand environment variables such as `$HOME'. meta = { - description = "A spell checker for many languages"; + description = "GNU Aspell, A spell checker for many languages"; homepage = http://aspell.net/; license = "LGPL"; }; diff --git a/pkgs/development/libraries/aspell/dict-path.patch b/pkgs/development/libraries/aspell/dict-path.patch deleted file mode 100644 index c044c3d0eba4d..0000000000000 --- a/pkgs/development/libraries/aspell/dict-path.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -rc aspell-0.60.5-orig/common/info.cpp aspell-0.60.5/common/info.cpp -*** aspell-0.60.5-orig/common/info.cpp 2004-11-10 07:18:45.000000000 +0100 ---- aspell-0.60.5/common/info.cpp 2007-10-23 17:30:47.000000000 +0200 -*************** -*** 209,214 **** ---- 209,215 ---- - unsigned int name_size, - IStream & in) - { -+ char * extra_dict_dirs = getenv("ASPELL_EXTRA_DICT_DIRS"); - ModuleInfoNode * * prev = &head_; - ModuleInfoNode * to_add = new ModuleInfoNode(); - to_add->c_struct.name = 0; -*************** -*** 246,251 **** ---- 247,260 ---- - goto RETURN_ERROR; - } - } -+ -+ // Add dictionaries from directories in -+ // $ASPELL_EXTRA_DICT_DIRS. Maybe this isn't the right place to do -+ // this, but it works. -+ if (extra_dict_dirs) { -+ to_add->c_struct.dict_dirs = &(to_add->dict_dirs); -+ itemize(extra_dict_dirs, to_add->dict_dirs); -+ } - - while (*prev != 0 && - (*prev)->c_struct.order_num < to_add->c_struct.order_num) -- cgit 1.4.1