1 diff --git a/common/info.cpp b/common/info.cpp
2 index 8291cc7..6216326 100644
6 #include "strtonum.hpp"
8 #include "string_map.hpp"
9 +#include "file_util.hpp"
13 @@ -495,6 +496,25 @@ namespace acommon {
15 lst.add(config->retrieve("data-dir"));
16 lst.add(config->retrieve("dict-dir"));
17 + if (config->lookup("data-dir") == NULL && config->lookup("dict-dir") == NULL) {
18 + const char* cprofiles = getenv("NIX_PROFILES");
19 + if (cprofiles != NULL) {
20 + char* profiles = strdup(cprofiles);
21 + char* profile = profiles;
22 + char* end = profile;
23 + while (*end != '\0') {
26 + lst.add(add_possible_dir(profile, "lib/aspell"));
32 + lst.add(add_possible_dir(profile, "lib/aspell"));
38 DictExt::DictExt(ModuleInfo * m, const char * e)