File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 17
17
18
18
### devenv.sh
19
19
20
- https://devenv.sh/pre-commit-hooks/
20
+ ``` nix
21
+ { inputs, ... }:
22
+
23
+ {
24
+ git-hooks.hooks = {
25
+ # lint shell scripts
26
+ shellcheck.enable = true;
27
+ # execute example shell from Markdown files
28
+ mdsh.enable = true;
29
+ # format Python code
30
+ black.enable = true;
31
+
32
+ # override a package with a different version
33
+ ormolu.enable = true;
34
+ ormolu.package = pkgs.haskellPackages.ormolu;
35
+
36
+ # some hooks have more than one package, like clippy:
37
+ clippy.enable = true;
38
+ clippy.packageOverrides.cargo = pkgs.cargo;
39
+ clippy.packageOverrides.clippy = pkgs.clippy;
40
+ # some hooks provide settings
41
+ clippy.settings.allFeatures = true;
42
+ };
43
+ }
44
+ ```
45
+
46
+ See [ getting started] ( https://devenv.sh/getting-started/ ) .
21
47
22
48
## Flakes support
23
49
You can’t perform that action at this time.
0 commit comments