Skip to content

Commit

Permalink
chore: work around cabal-fmt haskell.nix issue
Browse files Browse the repository at this point in the history
`cabal-fmt` doesn't build with GHC 9.10 and haskell.nix, so we build
it with GHC 9.8.2, instead.

Signed-off-by: Drew Hess <[email protected]>
  • Loading branch information
dhess committed Jul 18, 2024
1 parent 1388baf commit aecfbca
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,6 @@
# 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
{
Expand All @@ -318,11 +314,10 @@
# package = haskellNixTools.hlint;
# };

# Disabled for GHC 9.10.
# programs.cabal-fmt = {
# enable = true;
# package = haskellNixTools.cabal-fmt;
# };
programs.cabal-fmt = {
enable = true;
package = pkgs.cabal-fmt;
};
programs.fourmolu = {
enable = true;
package = haskellNixTools.fourmolu;
Expand Down Expand Up @@ -377,6 +372,10 @@
{
overlays.default = (final: prev:
let
ghc982Tools = final.haskell-nix.tools "ghc982" {
cabal-fmt = "latest";
};

sqitch = final.callPackage ./nix/pkgs/sqitch {
sqliteSupport = true;
};
Expand Down Expand Up @@ -500,9 +499,6 @@

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";
};
Expand All @@ -512,6 +508,8 @@
sqlite
openapi-generator-cli

cabal-fmt

# For Language Server support.
nodejs-18_x

Expand Down Expand Up @@ -664,6 +662,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;
}
);

Expand Down

0 comments on commit aecfbca

Please sign in to comment.