Skip to content
Open
Show file tree
Hide file tree
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
71 changes: 28 additions & 43 deletions flake.lock

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

5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
nixpkgs-latest.url = "github:nixos/nixpkgs/nixpkgs-unstable";

flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
haskell-flake.url = "github:rsrohitsingh682/haskell-flake/cache-cabal2nix";
systems.url = "github:nix-systems/default";
flake-root.url = "github:srid/flake-root";
nixpkgs-21_11.url = "github:nixos/nixpkgs/nixos-21.11"; # Used for ormolu
Expand All @@ -20,7 +20,8 @@
# Commonly useful flakes
mission-control.url = "github:Platonic-Systems/mission-control";
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks-nix.url = "github:cachix/git-hooks.nix";


# Packages not in nixpkgs; or out of date in nixpkgs.
process-compose.url = "github:F1bonacc1/process-compose"; # Until 0.80.0+ is nixpkgs, to get us: https://github.com/F1bonacc1/process-compose/issues/125
Expand Down
14 changes: 11 additions & 3 deletions nix/pre-commit.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# https://pre-commit.com/ hooks defined in Nix
# cf. https://github.com/cachix/pre-commit-hooks.nix
{ ... }:
{ inputs, ... }:

{
perSystem = { pkgs, lib, ... }: {
perSystem = { pkgs, lib, system, config, ... }: {
pre-commit = {
pkgs = inputs.common.inputs.nixpkgs-latest.legacyPackages.${system};
check.enable = true;
settings = {
hooks = {
treefmt.enable = true;
treefmt = {
enable = true;
excludes = [ config.pre-commit.settings.hooks.cabal2nix.settings.outputFilename ];
};
cabal2nix = {
enable = true;
settings.outputFilename = "cabal.nix";
};
nil.enable = lib.mkDefault true;
hpack.enable = true;
# FIXME: Disabled due to purity issues
Expand Down