Skip to content

Commit

Permalink
Add pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
maralorn committed Mar 8, 2022
1 parent b8a92a5 commit 2482c4f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 245 deletions.
12 changes: 7 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = github:edolstra/flake-compat;
url = "github:edolstra/flake-compat";
flake = false;
};
};
Expand All @@ -16,8 +16,7 @@
}:
flake-utils.lib.eachSystem ["x86_64-linux"] (
system: let
pkgs = inputs.nixpkgs.legacyPackages.${system};
inherit (pkgs) lib haskellPackages haskell;
inherit (inputs.nixpkgs.legacyPackages.${system}) lib haskellPackages haskell;
golden-test = import ./test/golden1.nix {
seed = "1";
inherit system;
Expand Down Expand Up @@ -45,14 +44,17 @@
];
hooks = {
hlint.enable = true;
cabal-fmt.enable = true;
alejandra.enable = true;
nix-linter.enable = true;
statix.enable = true;
fourmolu.enable = true;
cabal-fmt.enable = true;
shellcheck.enable = true;
};
};
};
devShell = haskellPackages.shellFor {
packages = p: [defaultPackage];
packages = _: [defaultPackage];
buildInputs = [inputs.pre-commit-hooks.defaultPackage.${system}];
withHoogle = true;
inherit (self.checks.${system}.pre-commit-check) shellHook;
Expand Down
14 changes: 0 additions & 14 deletions nix/sources.json

This file was deleted.

226 changes: 0 additions & 226 deletions nix/sources.nix

This file was deleted.

1 change: 1 addition & 0 deletions test/golden2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ with import <nixpkgs> {}; let
build2 = pkgs.runCommand "build2" {} ''
sleep 3s
cat ${build5}
cat ${build6}
cat ${build1}
echo "test" > $out
'';
Expand Down

0 comments on commit 2482c4f

Please sign in to comment.