Commit a79604e 1 parent 7a334ac commit a79604e Copy full SHA for a79604e
File tree 4 files changed +44
-37
lines changed
4 files changed +44
-37
lines changed Original file line number Diff line number Diff line change 38
38
with :
39
39
extra_nix_config : |
40
40
accept-flake-config = true
41
- - name : Format via Cabal and Ormolu
41
+ - name : Format via Ormolu
42
42
run : |
43
43
nix run .#format
44
44
git diff --exit-code --color=always
Original file line number Diff line number Diff line change 8
8
nixpkgs . follows = "haskellNix/nixpkgs-unstable" ;
9
9
flake-utils . url = "github:numtide/flake-utils" ;
10
10
pre-commit-hooks = {
11
- url = "github:cachix/pre-commit-hooks.nix" ;
12
- inputs . nixpkgs . follows = "nixpkgs" ;
13
- inputs . flake-utils . follows = "flake-utils" ;
11
+ url = "github:amesgen/pre-commit-hooks.nix/cabal-gild" ;
14
12
} ;
15
13
16
14
# for Ormolu Live
119
117
pre-commit-check = inputs . pre-commit-hooks . lib . ${ system } . run {
120
118
src = ./. ;
121
119
hooks = {
120
+ cabal-gild . enable = true ;
122
121
nixpkgs-fmt . enable = true ;
123
122
deadnix . enable = true ;
124
123
purs-tidy . enable = true ;
150
149
name = "ormolu-format" ;
151
150
text = builtins . readFile ./nix/format.sh ;
152
151
runtimeInputs = [
153
- ( defaultGHC . dev . hsPkgs . tool "cabal" "latest" )
154
152
defaultGHC . ormolu
155
153
] ;
156
154
} ;
165
163
configureArgs = "--disable-benchmarks --disable-tests" ;
166
164
} ;
167
165
} ;
166
+ nativeBuildInputs = pre-commit-check . enabledPackages ;
168
167
withHoogle = false ;
169
168
exactDeps = false ;
170
169
inherit ( pre-commit-check ) shellHook ;
Original file line number Diff line number Diff line change 2
2
3
3
export LANG=" C.UTF-8"
4
4
5
- cabal format
6
- (cd extract-hackage-info && cabal format)
7
- (cd ormolu-live && cabal format)
8
-
9
5
export dirs=" src app tests extract-hackage-info/src ormolu-live/app"
10
6
# shellcheck disable=SC2046,SC2086
11
7
ormolu -m inplace $( find $dirs -type f -name " *.hs" -o -name " *.hs-boot" )
You can’t perform that action at this time.
0 commit comments