Skip to content

Commit 5109ce5

Browse files
committed
Add buildType and setup to hsPkgs redirects
1 parent 489b333 commit 5109ce5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/install-plan/redirect.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ let
2424
value = lookupComponent collectionName name available;
2525
in { inherit name value; }
2626
)) componentsByName));
27+
defaultTargetPackage = config.hsPkgs.${(builtins.head (
28+
# Use the package identified by the library component
29+
componentsByName.lib or
30+
# Or by the first component
31+
componentsByName.${builtins.head (builtins.attrNames componentsByName)}
32+
)).id};
2733
in rec {
2834
isRedirect = true;
2935
identifier = rec { name = (builtins.head packageTargets).pkg-name; version = (builtins.head packageTargets).pkg-version; id = "${name}-${version}"; };
@@ -35,6 +41,7 @@ let
3541
checks = pkgs.recurseIntoAttrs (builtins.mapAttrs
3642
(_: d: pkgs.haskell-nix.haskellLib.check d)
3743
(lib.filterAttrs (_: d: d.config.doCheck) components.tests));
44+
inherit (defaultTargetPackage) buildType setup;
3845
};
3946
in {
4047
hsPkgs =

0 commit comments

Comments
 (0)