File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,19 @@ in {
340
340
341
341
# Converts from a `compoent.depends` value to a library derivation.
342
342
# In the case of sublibs the `depends` value should already be the derivation.
343
- dependToLib = d : d . components . library or d ;
343
+ dependToLib = d :
344
+ # Do simplify this to `d.components.library or d`, as that
345
+ # will not give a good error message if the `.library`
346
+ # is missing (happens if the package is unplanned,
347
+ # but has overrides).
348
+ # It would be nice to put an `assert` here, but there is
349
+ # currently no good way to get the name of the dependency
350
+ # when it is not in the plan. The attribute path of
351
+ # `d` in the `nix` error should include the name
352
+ # eg. `packages.Cabal.components.library`.
353
+ if d ? components
354
+ then d . components . library
355
+ else d ;
344
356
345
357
projectOverlays = import ./project-overlays.nix {
346
358
inherit lib haskellLib ;
You can’t perform that action at this time.
0 commit comments