Hi,
the attached patches make it possible to have both system- and user-
installed aspell dictionaries and all of them available to aspell.
The first patches aspell to allow multiple data directories, the latter
patches NixOS's bash profile to take advantage of this.
Yours,
Petr
Index: pkgs/development/libraries/aspell/default.nix
===================================================================
--- pkgs/development/libraries/aspell/default.nix (revision 31261)
+++ pkgs/development/libraries/aspell/default.nix (working copy)
@@ -9,6 +9,7 @@
};
buildInputs = [ perl ];
+ patches = [ ./datadirs.diff ];
doCheck = true;
Index: pkgs/development/libraries/aspell/datadirs.diff
===================================================================
--- pkgs/development/libraries/aspell/datadirs.diff (revision 0)
+++ pkgs/development/libraries/aspell/datadirs.diff (working copy)
@@ -0,0 +1,22 @@
+--- aspell-0.60.6.1.orig/common/config.cpp 2011-07-02 23:30:12.000000000 +0200
++++ aspell-0.60.6.1/common/config.cpp 2011-12-16 11:33:29.000000000 +0100
+@@ -1367,6 +1367,8 @@
+ N_("create dictionary aliases")}
+ , {"dict-dir", KeyInfoString, DICT_DIR,
+ N_("location of the main word list")}
++ , {"dict-dirs", KeyInfoList, DICT_DIR,
++ N_("locations of additional word lists")}
+ , {"encoding", KeyInfoString, "!encoding",
+ N_("encoding to expect data to be in"), KEYINFO_COMMON}
+ , {"filter", KeyInfoList , "url",
+diff -ru aspell-0.60.6.1.orig/common/info.cpp aspell-0.60.6.1/common/info.cpp
+--- aspell-0.60.6.1.orig/common/info.cpp 2011-07-02 23:09:08.000000000 +0200
++++ aspell-0.60.6.1/common/info.cpp 2011-12-16 11:44:51.000000000 +0100
+@@ -495,6 +495,7 @@
+ lst.clear();
+ lst.add(config->retrieve("data-dir"));
+ lst.add(config->retrieve("dict-dir"));
++ config->retrieve_list("dict-dirs", &lst);
+ }
+
+
Index: modules/programs/bash/profile.sh
===================================================================
--- modules/programs/bash/profile.sh (revision 31261)
+++ modules/programs/bash/profile.sh (working copy)
@@ -57,7 +57,7 @@
done
# Search directory for Aspell dictionaries.
-export ASPELL_CONF="dict-dir $HOME/.nix-profile/lib/aspell"
+export ASPELL_CONF="add-dict-dirs /var/run/current-system/sw/lib/aspell; add-dict-dirs $HOME/.nix-profile/lib/aspell"
# The setuid wrappers override other bin directories.
export PATH=@wrapperDir@:$PATH
--
id' Ash = Ash; id' Dust = Dust; id' _ = undefined
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev