1 :100644 100644 fac4f53 aed9617 M src/rimeengine.cpp
3 diff --git a/src/rimeengine.cpp b/src/rimeengine.cpp
4 index fac4f53..aed9617 100644
5 --- a/src/rimeengine.cpp
6 +++ b/src/rimeengine.cpp
7 @@ -164,7 +164,10 @@ void RimeEngine::rimeStart(bool fullcheck) {
8 RIME_ERROR() << "Failed to create user directory: " << userDir;
11 - const char *sharedDataDir = RIME_DATA_DIR;
12 + const char *sharedDataDir = getenv("NIX_RIME_DATA_DIR");
13 + if (!sharedDataDir) {
14 + sharedDataDir = RIME_DATA_DIR;
17 RIME_STRUCT(RimeTraits, fcitx_rime_traits);
18 fcitx_rime_traits.shared_data_dir = sharedDataDir;