File tree Expand file tree Collapse file tree 3 files changed +24
-11
lines changed Expand file tree Collapse file tree 3 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 33## ` master `
44
55- #134 : Add ` autoWire ` option to control generation of flake outputs
6+ - #138 : Add ` checks ` to ` outputs ` submodule
67
78## 0.2.0 (Mar 13, 2023)
89
Original file line number Diff line number Diff line change 3232 '' ;
3333 default = false ;
3434 } ;
35-
35+ drv = mkOption {
36+ type = types . package ;
37+ readOnly = true ;
38+ description = ''
39+ The `hlsCheck` derivation generated for this project.
40+ '' ;
41+ } ;
3642 } ;
3743 } ;
3844 packageSubmodule = with types ; submodule {
136142 The development shell derivation generated for this project.
137143 '' ;
138144 } ;
139- hlsCheck = mkOption {
140- type = types . package ;
145+ checks = mkOption {
146+ type = types . lazyAttrsOf types . package ;
141147 readOnly = true ;
142148 description = ''
143- The `hlsCheck` derivation generated for this project.
149+ The flake checks generated for this project.
144150 '' ;
145151 } ;
152+
146153 } ;
147154 } ;
148155 projectSubmodule = types . submoduleWith {
310317 checks =
311318 mergeMapAttrs
312319 ( name : project :
313- lib . optionalAttrs ( project . autoWire && project . devShell . enable && project . devShell . hlsCheck . enable ) {
314- "${ name } -hls" = project . outputs . hlsCheck ;
315- } )
320+ lib . optionalAttrs project . autoWire project . outputs . checks
321+ )
316322 config . haskellProjects ;
317323 } ;
318324 } ) ;
Original file line number Diff line number Diff line change 6262 ++ builtins . attrValues ( config . devShell . extraLibraries p ) ;
6363 } ;
6464 } ) ;
65+ hlsCheck =
66+ runCommandInSimulatedShell
67+ devShell
68+ self "${ projectKey } -hls-check"
69+ { } "haskell-language-server" ;
6570 in
6671 {
6772 outputs = {
8489 ( name : _ : finalPackages . "${ name } " )
8590 config . packages ;
8691
87- hlsCheck = runCommandInSimulatedShell
88- devShell
89- self "${ projectKey } -hls-check"
90- { } "haskell-language-server" ;
92+ checks = lib . filterAttrs ( _ : v : v != null ) {
93+ "${ name } -hls" = if ( config . devShell . enable && config . devShell . hlsCheck . enable ) then hlsCheck else null ;
94+ } ;
9195
9296 } ;
97+
98+ devShell . hlsCheck . drv = hlsCheck ;
9399 } ;
94100}
You can’t perform that action at this time.
0 commit comments