File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -284,5 +284,15 @@ in {
284
284
} ;
285
285
} ;
286
286
287
+ # This has one quirk. Manually setting options on the all component
288
+ # will be considered a conflict. This is almost always fine; most
289
+ # settings should be modified in either the package options, or an
290
+ # individual component's options. When this isn't sufficient,
291
+ # mkForce is a reasonable workaround.
292
+ #
293
+ # An alternative solution to mkForce for many of the options where
294
+ # this is relevant would be to switch from the bool type to
295
+ # something like an anyBool type, which would merge definitions by
296
+ # returning true if any is true.
287
297
config . components . all = lib . mkMerge ( haskellLib . getAllComponents config ) ;
288
298
}
Original file line number Diff line number Diff line change 25
25
# vary component config for tests
26
26
{
27
27
packages . test-with-packages . components = {
28
- all . doExactConfig = false ; # the default
28
+ all . doExactConfig = mkForce false ; # the default; use force because of quirk in all. See package.nix
29
29
library . doExactConfig = true ; # not the default
30
30
} ;
31
31
}
68
68
'' ;
69
69
70
70
meta . platforms = platforms . all ;
71
- } // {
72
- # Used for debugging with nix repl
73
- inherit packages pkgSet ;
71
+ passthru = {
72
+ # Used for debugging with nix repl
73
+ inherit packages pkgSet ;
74
74
75
- # Used for testing externally with nix-shell (../tests.sh).
76
- # This just adds cabal-install to the existing shells.
77
- test-shell = addCabalInstall packages . test-with-packages . components . all ;
75
+ # Used for testing externally with nix-shell (../tests.sh).
76
+ # This just adds cabal-install to the existing shells.
77
+ test-shell = addCabalInstall packages . test-with-packages . components . all ;
78
78
79
- # A variant of test-shell with the component option doExactConfig enabled
80
- test-shell-dec = addCabalInstall packages . test-with-packages . components . library ;
79
+ # A variant of test-shell with the component option doExactConfig enabled
80
+ test-shell-dec = addCabalInstall packages . test-with-packages . components . library ;
81
+ } ;
81
82
}
You can’t perform that action at this time.
0 commit comments