Skip to content

Commit

Permalink
Merge pull request #1304 from input-output-hk/treefmt-fix
Browse files Browse the repository at this point in the history
Use smaller devShell in treefmt job
  • Loading branch information
locallycompact authored Feb 12, 2024
2 parents befe501 + a8b7352 commit 406d7ef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:

- name: 📐 Check code formatting
run: |
nix develop .#ci --command treefmt --fail-on-change
nix develop .#fmt --command treefmt --fail-on-change
18 changes: 16 additions & 2 deletions nix/hydra/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ let

cabal = pkgs.haskell-nix.cabal-install.${compiler};

fourmolu = pkgs.haskell-nix.tool compiler "fourmolu" "0.14.0.0";
cabal-fmt = pkgs.haskell-nix.tool compiler "cabal-fmt" "0.1.9";

# Build HLS form our fork (see flake.nix)
haskell-language-server = pkgs.haskell-nix.tool compiler "haskell-language-server" rec {
src = inputs.hls;
Expand All @@ -39,8 +42,8 @@ let
pkgs.haskellPackages.hspec-discover
# Formatting
pkgs.treefmt
(pkgs.haskell-nix.tool compiler "fourmolu" "0.14.0.0")
(pkgs.haskell-nix.tool compiler "cabal-fmt" "0.1.9")
fourmolu
cabal-fmt
pkgs.nixpkgs-fmt
# For validating JSON instances against a pre-defined schema
pkgs.check-jsonschema
Expand Down Expand Up @@ -145,6 +148,16 @@ let
];
};

fmtShell = pkgs.mkShell {
name = "hydra-format-shell";
buildInputs = [
pkgs.treefmt
fourmolu
cabal-fmt
pkgs.nixpkgs-fmt
];
};

# If you want to modify `Python` code add `libtmux` and pyyaml to the
# `buildInputs` then enter it and then run `Python` module directly so you
# have fast devel cycle.
Expand All @@ -159,4 +172,5 @@ in
cabalOnly = cabalShell;
exes = exeShell;
demo = demoShell;
fmt = fmtShell;
}

0 comments on commit 406d7ef

Please sign in to comment.