on iko/ghcjs-patch-master help sign in
Add NIX_GHC_LIBDIR to shellFor (like nixpkgs does) (#559)
a39b5a7Hamish Mackenzie
builder/shell-for.nix+4
@@ -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";
92
92
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;
96+
93 passthru = (mkDrvArgs.passthru or {}) // {
97 passthru = (mkDrvArgs.passthru or {}) // {
94 ghc = ghcEnv;
98 ghc = ghcEnv;
95 inherit configFiles;
99 inherit configFiles;