Skip to content

How to have a properly setup haskell-language-server in nix-shell? #1012

Closed
@abailly

Description

@abailly

Disclaimer: I am a total noob when it comes to nix + Haskell setup.

In order to learn how to use nix with Haskell, I have tried adding nix configuration to an existing simple package: https://github.com/abailly/hydra-sim/blob/master/shell.nix following the tutorial here: https://input-output-hk.github.io/haskell.nix/tutorials/getting-started/
After some fiddling I managed to have nix-build building the package, and nix-shell dropping me into a properly configured shell. However, I am struggling with configuration of haskell-language-server, more specifically to get the correct version which should be HLS for 8.10.2 (the compile version defined in default.nix).
I have tried to configure it following https://haskell4nix.readthedocs.io/nixpkgs-users-guide.html?highlight=language%20server#how-to-install-haskell-language-server with some adaptation:

    buildInputs = with pkgs.haskellPackages;
      [ ghcid
        haskell-language-server.override { supportedGhcVersions = [ "8102" ]; }
      ];

but to no avail. What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions