Add coreutils to pre-commit-hook to specify mktemp

This commit is contained in:
Archit Gupta 2023-04-16 19:59:02 -07:00
parent c9b8d986e1
commit ef5d482ea6

View File

@ -1,11 +1,12 @@
{ writeShellApplication { writeShellApplication
, coreutils
, nix , nix
, git , git
, gnutar , gnutar
}: }:
writeShellApplication { writeShellApplication {
name = "pre-commit"; name = "pre-commit";
runtimeInputs = [ nix git gnutar ]; runtimeInputs = [ coreutils nix git gnutar ];
text = '' text = ''
TREE=$(mktemp -d) TREE=$(mktemp -d)
git archive "$(git write-tree)" | tar -xC "$TREE" git archive "$(git write-tree)" | tar -xC "$TREE"