@@ -316,5 +316,12 @@ in {
316316 # this is relevant would be to switch from the bool type to
317317 # something like an anyBool type, which would merge definitions by
318318 # returning true if any is true.
319− config.components.all = lib.mkMerge (haskellLib.getAllComponents config);
319+ config.components.all = lib.mkMerge (
320+ builtins.map (c:
321+ # Exclude attributes that are likely to have conflicting definitions
322+ # (a common use case for `all` is in `shellFor` and it only has an
323+ # install phase).
324+ builtins.removeAttrs c ["preCheck" "postCheck"]
325+ ) (haskellLib.getAllComponents config)
326+ );
320327}