@@ -90,6 +90,10 @@ in
90 LANG = "en_US.UTF-8";
90 LANG = "en_US.UTF-8";
91 LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive";
91 LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive";
93+ # This helps tools like `ghcide` (that use the ghc api) to find
94+ # the correct global package DB.
95+ NIX_GHC_LIBDIR = ghcEnv + "/" + configFiles.libDir;
93 passthru = (mkDrvArgs.passthru or {}) // {
97 passthru = (mkDrvArgs.passthru or {}) // {
94 ghc = ghcEnv;
98 ghc = ghcEnv;
95 inherit configFiles;
99 inherit configFiles;