on iko/ghcjs-patch-master help sign in
Add NIX_GHC_LIBDIR to shellFor (like nixpkgs does) (#559)

Tools like ghcide use this to find the correct global package db.

commita39b5a741acca2fb4bfbb40251d984b2971287ee authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateFri 24 Apr 2020, 15:48 (7 years ago) parent829cba5
1 file changed+4
builder/shell-for.nix+4
builder/shell-for.nix+4
@@ -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;