mirror of
https://github.com/nix-community/flakelight.git
synced 2025-02-03 02:59:23 +01:00
16 lines
279 B
Nix
16 lines
279 B
Nix
{ writeShellApplication
|
|
, coreutils
|
|
, nix
|
|
, git
|
|
, gnutar
|
|
}:
|
|
writeShellApplication {
|
|
name = "pre-commit";
|
|
runtimeInputs = [ coreutils nix git gnutar ];
|
|
text = ''
|
|
TREE=$(mktemp -d)
|
|
git archive "$(git write-tree)" | tar -xC "$TREE"
|
|
nix flake check "$TREE"
|
|
'';
|
|
}
|