diff --git a/flake.nix b/flake.nix index 96ffc8127..8fc2c51cf 100644 --- a/flake.nix +++ b/flake.nix @@ -299,30 +299,20 @@ ]; haskellNixTools = pkgs.haskell-nix.tools ghcVersion { - # Disabled for GHC 9.10. - # https://github.com/ndmitchell/hlint/pull/1594 - #hlint = "latest"; fourmolu = fourmoluVersion; - - # Disabled for GHC 9.10. - # https://github.com/input-output-hk/haskell.nix/issues/2205 - #cabal-fmt = cabal-fmt-override; }; in { projectRootFile = "flake.nix"; - # Disabled for GHC 9.10. - # programs.hlint = { - # enable = true; - # package = haskellNixTools.hlint; - # }; - - # Disabled for GHC 9.10. - # programs.cabal-fmt = { - # enable = true; - # package = haskellNixTools.cabal-fmt; - # }; + programs.hlint = { + enable = true; + package = pkgs.hlint; + }; + programs.cabal-fmt = { + enable = true; + package = pkgs.cabal-fmt; + }; programs.fourmolu = { enable = true; package = haskellNixTools.fourmolu; @@ -330,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; }; @@ -377,6 +365,11 @@ { overlays.default = (final: prev: let + ghc982Tools = final.haskell-nix.tools "ghc982" { + hlint = "latest"; + cabal-fmt = "latest"; + }; + sqitch = final.callPackage ./nix/pkgs/sqitch { sqliteSupport = true; }; @@ -492,17 +485,11 @@ cabal = "latest"; - # Disabled for GHC 9.10. - #hlint = "latest"; - # Disabled, as it doesn't currently build with Nix. #weeder = weederVersion; fourmolu = fourmoluVersion; - # Disabled for GHC 9.10. - #cabal-fmt = cabal-fmt-override; - #TODO Explicitly requiring tasty-discover shouldn't be necessary - see the commented-out `build-tool-depends` in primer.cabal. tasty-discover = "latest"; }; @@ -512,6 +499,9 @@ sqlite openapi-generator-cli + hlint + cabal-fmt + # For Language Server support. nodejs-18_x @@ -664,6 +654,8 @@ inherit (benchmarks) primer-benchmark-results-json; inherit (benchmarks) primer-criterion-results-github-action-benchmark; inherit (benchmarks) primer-benchmark-results-github-action-benchmark; + + inherit (ghc982Tools) cabal-fmt hlint; } );