mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-10-26 15:23:14 +03:00
add pre-commit shellHook
This commit is contained in:
parent
667d639c94
commit
e0c433078b
@ -255,10 +255,8 @@
|
||||
++ lib.optionals pkgs.stdenv.isLinux [pkgs.cntr];
|
||||
|
||||
shellHook =
|
||||
# TODO: pre-commit shellHook disabled until this is solved:
|
||||
# https://github.com/cachix/pre-commit-hooks.nix/issues/140
|
||||
# self.checks.${system}.pre-commit-check.shellHook
|
||||
''
|
||||
self.checks.${system}.pre-commit-check.shellHook
|
||||
+ ''
|
||||
export NIX_PATH=nixpkgs=${nixpkgs}
|
||||
export d2nExternalDir=${externalDirFor."${system}"}
|
||||
export dream2nixWithExternals=${dream2nixFor."${system}".dream2nixWithExternals}
|
||||
@ -296,7 +294,7 @@
|
||||
entry = l.toString (pkgs.writeScript "treefmt" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
export PATH="$PATH:${alejandra.defaultPackage.${system}}/bin"
|
||||
${pkgs.treefmt}/bin/treefmt --fail-on-change
|
||||
${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change
|
||||
'');
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user