Skip to content
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

Fix HLS in nix development shell #791

Merged
merged 2 commits into from
Jul 9, 2024
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
14 changes: 7 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
];

# see flake `variants` below for alternative compilers
defaultCompiler = "ghc965";
defaultCompiler = "ghc982";
haddockShellCompiler = defaultCompiler;

mingwVersion = "ghc965";
cabalHeadOverlay = final: prev: {
cabal-head =
(final.haskell-nix.cabalProject {
Expand Down Expand Up @@ -85,7 +85,7 @@

# we also want cross compilation to windows on linux (and only with default compiler).
crossPlatforms = p:
lib.optional (system == "x86_64-linux" && config.compiler-nix-name == defaultCompiler)
lib.optional (system == "x86_64-linux" && config.compiler-nix-name == mingwVersion)
p.mingwW64;

# CHaP input map, so we can find CHaP packages (needs to be more
Expand All @@ -105,9 +105,9 @@
}
// lib.optionalAttrs (config.compiler-nix-name == defaultCompiler) {
# tools that work only with default compiler
haskell-language-server.src = nixpkgs.haskell-nix.sources."hls-2.6";
hlint = "3.6.1";
stylish-haskell = "0.14.5.0";
haskell-language-server.src = nixpkgs.haskell-nix.sources."hls-2.8";
hlint = "3.8";
stylish-haskell = "0.14.6.0";
};
# and from nixpkgs or other inputs
shell.nativeBuildInputs = with nixpkgs; [gh jq yq-go actionlint shellcheck cabal-head];
Expand Down Expand Up @@ -167,7 +167,7 @@
flake = cabalProject.flake (
lib.optionalAttrs (system == "x86_64-linux") {
# on linux, build/test other supported compilers
variants = lib.genAttrs ["ghc8107"] (compiler-nix-name: {
variants = lib.genAttrs ["ghc8107" mingwVersion] (compiler-nix-name: {
inherit compiler-nix-name;
});
}
Expand Down
Loading