Skip to content

Fix the workbench shell #4522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions nix/workbench/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ in project.shellFor {

inherit withHoogle;

# The workbench shell uses cabalWrapped, which removes the `source-repository-package` stanzas
# from `cabal.project`. The idea is to use prebuilt ones provided by haskell.nix. However,
# haskell.nix is clever enough to not include `source-repository-package`s in the shell
# package db, because it knows that cabal will rebuild them. So you just end up with nothing!
# We can work around this by overriding haskell.nix's selection of which packages the shell
# is prepared for, so that it *doesn't* include the `source-repository-package` ones
# (the default is *local* packages which includes them, we select *project* pacakges which doesn't)
packages = ps: builtins.attrValues (haskellLib.selectProjectPackages ps);

tools = {
haskell-language-server = {
version = "latest";
Expand Down