You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.
This is explained nicely in the Setup.md file in the ghcide repo:
If you are using packages installed by Nix, then often Nix will set NIX_GHC_LIBDIR to say where the libraries are installed. ghcide can cope with that. However, sometimes the ghc on your shell will actually be a shell script that sets NIX_GHC_LIBDIR, which ghcide can't find. If that happens, you need to either set NIX_GHC_LIBDIR (so ghcide can see it) or use a proper Nix compatible wrapper over ghcide.
So if I cat $(which ghc) inside a nix-shell in project, I do indeed see:
The problem is that the ghcide binary itself doesn't seem to have access to these variables.
At the moment, my workaround is to first cd into a directory where I've got direnv etc. all set up, do cat $(which ghc), then manually export the NIX_GHC_LIBDIR variable I see. I might automate this further once I get tired enough of this.
But leaving aside the workaround, what would be the correct way to get the ghcide binary to use the same NIX_GHC_LIBDIR value so that it can see all the libraries? Would you happen to know how that value is being produced for the ghc wrapper itself?
The text was updated successfully, but these errors were encountered:
I'm not sure whether this is an issue to file in the
haskell.nix
repo or here, please feel free to redirect me.I've got a haskell project setup with the following
default.nix
andshell.nix
:The
sources
expression comes fromniv
, to which I've added a bunch of different remote repos.Now when I run
ghcide
I run into the following issue:This is explained nicely in the
Setup.md
file in the ghcide repo:So if I
cat $(which ghc)
inside anix-shell
in project, I do indeed see:The problem is that the
ghcide
binary itself doesn't seem to have access to these variables.At the moment, my workaround is to first cd into a directory where I've got direnv etc. all set up, do
cat $(which ghc)
, then manually export theNIX_GHC_LIBDIR
variable I see. I might automate this further once I get tired enough of this.But leaving aside the workaround, what would be the correct way to get the ghcide binary to use the same
NIX_GHC_LIBDIR
value so that it can see all the libraries? Would you happen to know how that value is being produced for the ghc wrapper itself?The text was updated successfully, but these errors were encountered: