diff --git a/nix/git-identities/hooks/cabal/pre-commit b/nix/git-identities/hooks/cabal/pre-commit new file mode 100755 index 00000000..8d97c752 --- /dev/null +++ b/nix/git-identities/hooks/cabal/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +make style +make lint diff --git a/nix/git-identities/list.nix b/nix/git-identities/list.nix index 7df85864..b318462b 100644 --- a/nix/git-identities/list.nix +++ b/nix/git-identities/list.nix @@ -1,4 +1,7 @@ let + sources = import ../../npins; + lib = import (sources.nixpkgs + "/lib"); + haskellIdentity = { init.defaultBranch = "main"; user.name = "Léana Jiang"; @@ -16,6 +19,8 @@ let blameIgnore = { blame.ignoreRevsFile = ".git-blame-ignore-revs"; }; + + hooks = scriptsPath: { core.hooksPath = scriptsPath; }; in [ # Univ stuff @@ -49,6 +54,9 @@ in { url = "github.com"; path = "haskell/cabal.git"; - contents = blameIgnore; + contents = lib.mkMerge [ + blameIgnore + (hooks "${./hooks/cabal}") + ]; } ]