From 268a411ed1e9dfd13dba4b752fcd6e3d095fb7d8 Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Tue, 7 May 2024 11:33:03 -0700 Subject: [PATCH] feat: setup gerrit commit-msg hook with nix develop Closes #273 Change-Id: Id883d2cda06adbcae53b8c360ad015330f0af81b --- flake.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flake.nix b/flake.nix index 1c090cadf..cf28d7573 100644 --- a/flake.nix +++ b/flake.nix @@ -503,6 +503,13 @@ if ! [[ -f .nocontribmsg ]]; then cat ${contribNotice} fi + + # Install the Gerrit commit-msg hook. + if [[ ! -f .git/hooks/commit-msg ]]; then + mkdir -p .git/hooks + curl -s -Lo .git/hooks/commit-msg https://gerrit.lix.systems/tools/hooks/commit-msg + chmod u+x .git/hooks/commit-msg + fi ''; } // lib.optionalAttrs (stdenv.buildPlatform.isLinux && pkgs.glibcLocales != null) {