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

chore: reinstate cabal-fmt and hlint #1275

Merged
merged 2 commits into from
Jul 18, 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
46 changes: 19 additions & 27 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -299,40 +299,28 @@
];

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;
};
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 @@ -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;
};
Expand Down Expand Up @@ -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";
};
Expand All @@ -512,6 +499,9 @@
sqlite
openapi-generator-cli

hlint
cabal-fmt

# For Language Server support.
nodejs-18_x

Expand Down Expand Up @@ -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;
}
);

Expand Down
Loading