Skip to content

Commit d1f3c85

Browse files
committed
Fix components in build-type: Custom packages
These components may depend on the `library` component of the package however `plan.json` does not include that dependency (since cabal will build all the components at once). This fix adds the library component as a dependency of the other components.
1 parent 5071941 commit d1f3c85

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
let
9191
callFlake = import flake-compat;
9292

93-
ifdLevel = 3;
93+
ifdLevel = 0;
9494
runningHydraEvalTest = false;
9595
compiler = "ghc928";
9696
config = import ./config.nix;

lib/load-cabal-plan.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ let
4747
name = pkgs.lib.removePrefix "${prefix}:" n;
4848
value = (if cabal2nixComponents == null then {} else cabal2nixComponents.${collectionName}.${name}) // {
4949
buildable = true;
50-
} // lookupDependencies hsPkgs c.depends c.exe-depends;
50+
} // lookupDependencies hsPkgs (c.depends ++ pkgs.lib.optional (p ? components) p.id) c.exe-depends;
5151
in { inherit name value; }
5252
)) components));
5353
in

0 commit comments

Comments
 (0)