Skip to content

Commit

Permalink
Use fourmolu 0.5 in CI too
Browse files Browse the repository at this point in the history
  • Loading branch information
L-as committed Jan 17, 2022
1 parent cbeafe1 commit ed3178b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions flake.nix
Expand Up @@ -125,12 +125,15 @@
nixpkgsFor = system: import nixpkgs { inherit system; overlays = [ haskell-nix.overlay ]; inherit (haskell-nix) config; };
nixpkgsFor' = system: import nixpkgs { inherit system; inherit (haskell-nix) config; };

ghcVersion = "ghc921";
tools.fourmolu = {};

projectFor = system:
let pkgs = nixpkgsFor system; in
let pkgs' = nixpkgsFor' system; in
(nixpkgsFor system).haskell-nix.cabalProject' {
src = ./.;
compiler-nix-name = "ghc921";
compiler-nix-name = ghcVersion;
cabalProjectFileName = "cabal.project";
inherit extraSources;
modules = [{
Expand Down Expand Up @@ -190,7 +193,7 @@
# haskell-language-server = {}; # Must use haskell.nix, because the compiler version should match
# };

tools.fourmolu = {};
inherit tools;

additional = ps: [
ps.plutus-ledger-api
Expand All @@ -202,10 +205,10 @@

formatCheckFor = system:
let
pkgs = nixpkgsFor' system;
pkgs = nixpkgsFor system;
in
pkgs.runCommand "format-check" {
nativeBuildInputs = [ pkgs.haskellPackages.fourmolu ];
nativeBuildInputs = [ (pkgs.haskell-nix.tools ghcVersion { inherit (tools) fourmolu; }).fourmolu ];
} ''
export LC_CTYPE=C.UTF-8
export LC_ALL=C.UTF-8
Expand Down

0 comments on commit ed3178b

Please sign in to comment.