File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 11# Revision history for haskell-flake
22
3+ ## ` master `
4+
5+ - #134 : Add ` autoWire ` option to control generation of flake outputs
6+
37## 0.2.0 (Mar 13, 2023)
48
59- New features
Original file line number Diff line number Diff line change 256256 This is an internal option, not meant to be set by the user.
257257 '' ;
258258 } ;
259+ autoWire = mkOption {
260+ type = types . bool ;
261+ description = ''
262+ Automatically wire up the project outputs to the flake outputs.
259263
260-
264+ Disable this if you want to control the flake outputs
265+ yourself. Useful, for example, when overriding the default
266+ shell.
267+ '' ;
268+ default = true ;
269+ } ;
261270 } ;
262271 } )
263272 ] ;
269278 description = "Haskell projects" ;
270279 type = types . attrsOf projectSubmodule ;
271280 } ;
272-
273281 } ;
274282
275283 config =
290298 then packageName
291299 else "${ name } -${ packageName } " ;
292300 in
293- mapKeys dropDefaultPrefix project . outputs . localPackages )
301+ lib . optionalAttrs project . autoWire ( mapKeys dropDefaultPrefix project . outputs . localPackages ) )
294302 config . haskellProjects ;
295303 devShells =
296304 mergeMapAttrs
297305 ( name : project :
298- lib . optionalAttrs project . devShell . enable {
306+ lib . optionalAttrs ( project . autoWire && project . devShell . enable ) {
299307 "${ name } " = project . outputs . devShell ;
300308 } )
301309 config . haskellProjects ;
302310 checks =
303311 mergeMapAttrs
304312 ( name : project :
305- lib . optionalAttrs ( project . devShell . enable && project . devShell . hlsCheck . enable ) {
313+ lib . optionalAttrs ( project . autoWire && project . devShell . enable && project . devShell . hlsCheck . enable ) {
306314 "${ name } -hls" = project . outputs . hlsCheck ;
307315 } )
308316 config . haskellProjects ;
You can’t perform that action at this time.
0 commit comments