I have a haskell project that I’m building with a flake and it depends on another library that I’ve written. I add my library to haskell packages through an overlay and can successfully build my project. However, I cannot use HLS.
HSL gives the following error
Consulting the cradle to get project GHC version...
2023-08-23T00:35:04.007012Z | Debug | executing command: cabal exec -v0 -- ghc --print-libdir
Failed to find the GHC version of this Cabal project.
Error when calling cabal exec -v0 -- ghc --print-libdir
Error: cabal: Could not resolve dependencies:
[__0] trying: tigris-0.1.0.0 (user goal)
[__1] unknown package: vox-hs (dependency of tigris)
[__1] fail (backjumping, conflict set: tigris, vox-hs)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: tigris, vox-hs
(vox-hs is my library dependency.) Is there a pure nix-style way to add vox-hs to cabal’s library database? It seems cabal install vox-hs
would resolve the issue, but this does not seem good in the long run.
Additionally, is there some way to update the cabal database from within the nix flake? At the moment I install cabal in my dev-shell with direnv and run cabal update
from time to time, which isn’t the most reproducable. Thanks!