Skip to content

Commit a39b5a7

Browse files
authored
Add NIX_GHC_LIBDIR to shellFor (like nixpkgs does) (#559)
Tools like ghcide use this to find the correct global package db.
1 parent 829cba5 commit a39b5a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builder/shell-for.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ in
9090
LANG = "en_US.UTF-8";
9191
LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive";
9292

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+
9397
passthru = (mkDrvArgs.passthru or {}) // {
9498
ghc = ghcEnv;
9599
inherit configFiles;

0 commit comments

Comments
 (0)