File tree Expand file tree Collapse file tree 4 files changed +54
-5
lines changed Expand file tree Collapse file tree 4 files changed +54
-5
lines changed Original file line number Diff line number Diff line change 30
30
31
31
- name : 📐 Check hlint
32
32
run : |
33
- nix develop .#fmt --command hlint .
33
+ nix build .#checks.x86_64-linux.hlint
Original file line number Diff line number Diff line change 4
4
haskellNix . url = "github:input-output-hk/haskell.nix" ;
5
5
iohk-nix . url = "github:input-output-hk/iohk-nix" ;
6
6
flake-utils . url = "github:numtide/flake-utils" ;
7
+ lint-utils = {
8
+ url = "github:homotopic/lint-utils" ;
9
+ inputs . nixpkgs . follows = "haskellNix/nixpkgs" ;
10
+ } ;
7
11
CHaP = {
8
12
url = "github:input-output-hk/cardano-haskell-packages?ref=repo" ;
9
13
flake = false ;
33
37
( system :
34
38
let
35
39
pkgs = import inputs . nixpkgs { inherit system ; } ;
40
+ tools = {
41
+ hlint = hydraProject . pkgs . haskell-nix . tool hydraProject . compiler "hlint" "3.8" ;
42
+ } ;
36
43
hydraProject = import ./nix/hydra/project.nix {
37
44
inherit ( inputs ) haskellNix iohk-nix CHaP ;
38
45
inherit system nixpkgs ;
58
65
spec = import ./spec { inherit pkgs ; } ;
59
66
} ;
60
67
68
+ checks = let lu = inputs . lint-utils . linters . ${ system } ; in {
69
+ hlint = lu . hlint { src = self ; hlint = tools . hlint ; } ;
70
+ } ;
71
+
61
72
devShells = ( import ./nix/hydra/shell.nix {
62
- inherit inputs hydraProject system ;
73
+ inherit inputs hydraProject tools system ;
63
74
} ) // {
64
75
ci = ( import ./nix/hydra/shell.nix {
65
76
inherit inputs hydraProject system ;
Original file line number Diff line number Diff line change 7
7
withoutDevTools ? false
8
8
, hydraProject
9
9
, inputs
10
+ , tools
10
11
, system ? builtins . currentSystem
11
12
} :
12
13
let
16
17
17
18
fourmolu = pkgs . haskell-nix . tool compiler "fourmolu" "0.14.0.0" ;
18
19
cabal-fmt = pkgs . haskell-nix . tool compiler "cabal-fmt" "0.1.9" ;
19
- hlint = pkgs . haskell-nix . tool compiler "hlint" "3.8" ;
20
20
apply-refact = pkgs . haskell-nix . tool compiler "apply-refact" "0.14.0.0" ;
21
21
22
22
# Build HLS form our fork (see flake.nix)
47
47
fourmolu
48
48
cabal-fmt
49
49
pkgs . nixpkgs-fmt
50
- hlint
50
+ tools . hlint
51
51
apply-refact
52
52
# For validating JSON instances against a pre-defined schema
53
53
pkgs . check-jsonschema
159
159
fourmolu
160
160
cabal-fmt
161
161
pkgs . nixpkgs-fmt
162
- hlint
162
+ tools . hlint
163
163
apply-refact
164
164
] ;
165
165
} ;
You can’t perform that action at this time.
0 commit comments