mirror of
https://github.com/nix-community/flakelight.git
synced 2024-11-25 17:03:14 +01:00
11 lines
292 B
Nix
11 lines
292 B
Nix
_: {
|
|
shellHook = { lib, flakelite }: ''
|
|
if [ -f flake.nix ] && [ -d .git/hooks ] &&
|
|
[ ! -f .git/hooks/pre-commit ]; then
|
|
echo Installing git pre-commit hook...
|
|
cp ${lib.getExe flakelite.inputs'.flakelite.packages.pre-commit-hook
|
|
} .git/hooks
|
|
fi
|
|
'';
|
|
}
|