Skip to content

Commit

Permalink
Merge pull request #58 from cofree-coffee/infra/remove-pre-commit-hook
Browse files Browse the repository at this point in the history
Removes precommit-hooks
  • Loading branch information
solomon-b authored Nov 22, 2022
2 parents 998881c + b649279 commit 7e55234
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 71 deletions.
51 changes: 1 addition & 50 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 1 addition & 21 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
url = github:numtide/flake-utils;
inputs.nixpkgs.follows = "nixpkgs";
};

pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
};

outputs = { self, nixpkgs, flake-utils, pre-commit-hooks }:
outputs = { self, nixpkgs, flake-utils }:
let
ghcVersion = "924";
compiler = "ghc${ghcVersion}";
Expand Down Expand Up @@ -53,7 +51,6 @@
# Note: cannot reference anything that depends on `evalPkgs` like `hsPkgs`
# otherwise non-x86_64-linux users will not be able to build the dev env
devShell = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = with pkgs; [
cabal2nix
cabal-install
Expand All @@ -73,23 +70,6 @@
cofree-bot = hsPkgs.cofree-bot;
};

checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt.enable = true;
ormolu = {
name = "ormolu";
entry = "${pkgs.ormolu}/bin/ormolu --mode inplace $(git ls-files '*.hs')";
files = "\\.l?hs$";
language = "system";
pass_filenames = false;
};
cabal-fmt.enable = true;
};
};
};

defaultPackage = packages.cofree-bot;
});
}

0 comments on commit 7e55234

Please sign in to comment.