Skip to content

Commit

Permalink
chore: build hlint with GHC 9.8.2
Browse files Browse the repository at this point in the history
`hlint` doesn't yet support GHC 9.10, so let's build it with GHC
9.8.2, instead. This isn't ideal, but probably better than no `hlint`
at all.

Signed-off-by: Drew Hess <[email protected]>
  • Loading branch information
dhess committed Jul 18, 2024
1 parent aecfbca commit 9149725
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -299,21 +299,16 @@
];

haskellNixTools = pkgs.haskell-nix.tools ghcVersion {
# Disabled for GHC 9.10.
# https://github.com/ndmitchell/hlint/pull/1594
#hlint = "latest";
fourmolu = fourmoluVersion;
};
in
{
projectRootFile = "flake.nix";

# Disabled for GHC 9.10.
# programs.hlint = {
# enable = true;
# package = haskellNixTools.hlint;
# };

programs.hlint = {
enable = true;
package = pkgs.hlint;
};
programs.cabal-fmt = {
enable = true;
package = pkgs.cabal-fmt;
Expand All @@ -325,9 +320,7 @@
programs.nixpkgs-fmt.enable = true;
programs.shellcheck.enable = true;

# Disabled for GHC 9.10.
#settings.formatter.hlint.excludes = haskellExcludes;

settings.formatter.hlint.excludes = haskellExcludes;
settings.formatter.fourmolu.excludes = haskellExcludes;
};

Expand Down Expand Up @@ -373,6 +366,7 @@
overlays.default = (final: prev:
let
ghc982Tools = final.haskell-nix.tools "ghc982" {
hlint = "latest";
cabal-fmt = "latest";
};

Expand Down Expand Up @@ -491,9 +485,6 @@

cabal = "latest";

# Disabled for GHC 9.10.
#hlint = "latest";

# Disabled, as it doesn't currently build with Nix.
#weeder = weederVersion;

Expand All @@ -508,6 +499,7 @@
sqlite
openapi-generator-cli

hlint
cabal-fmt

# For Language Server support.
Expand Down Expand Up @@ -663,7 +655,7 @@
inherit (benchmarks) primer-criterion-results-github-action-benchmark;
inherit (benchmarks) primer-benchmark-results-github-action-benchmark;

inherit (ghc982Tools) cabal-fmt;
inherit (ghc982Tools) cabal-fmt hlint;
}
);

Expand Down

0 comments on commit 9149725

Please sign in to comment.