Skip to content

Commit

Permalink
add enable = true to libraries in bootstrap flake
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Sep 24, 2023
1 parent 010b699 commit 842bace
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
5 changes: 4 additions & 1 deletion packages/hix/lib/Hix/Bootstrap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ renderComponent :: HixComponent -> ExprAttr
renderComponent HixComponent {..} =
ExprAttr key cabalConfig
where
cabalConfig = ExprAttrs (known <> foldMap preludeAttrs prelude)
cabalConfig = ExprAttrs (enable <> foldMap preludeAttrs prelude <> known)
preludeAttrs p =
[ExprAttr "prelude" (ExprAttrs [
ExprAttr "package" (preludePackageAttrs p),
Expand All @@ -358,6 +358,9 @@ renderComponent HixComponent {..} =
Executable name -> [exon|executables.#{name}|]
Test name -> [exon|tests.#{name}|]
Benchmark name -> [exon|benchmarks.#{name}|]
enable = case special of
Library -> [ExprAttr "enable" (ExprLit "true")]
_ -> []

flakePackage :: HixPackage -> ExprAttr
flakePackage pkg =
Expand Down
15 changes: 8 additions & 7 deletions packages/hix/test/Hix/Test/BootstrapTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ flakeTarget =
};
};
library = {
enable = true;
prelude = {
package = {
name = "incipit-base";
version = ">=0.4 && <0.6";
};
module = "IncipitBase";
};
dependencies = [
"containers"
"base >=4 && <5"
Expand All @@ -122,13 +130,6 @@ flakeTarget =
ghc-options = [
"-Wall"
];
prelude = {
package = {
name = "incipit-base";
version = ">=0.4 && <0.6";
};
module = "IncipitBase";
};
};
executables.red-panda = {
dependencies = [
Expand Down

0 comments on commit 842bace

Please sign in to comment.