Log the default 'packages' value

This commit is contained in:
Sridhar Ratnakumar 2023-04-27 11:52:52 -04:00
parent eed521db07
commit 1ca25ec71f
2 changed files with 11 additions and 6 deletions

View File

@ -7,7 +7,7 @@
- #143: Changed `autoWire` to be an enum type, for granular controlling of which outputs to autowire.
- #137: Expose cabal executables as flake apps. Add a corresponding `outputs.apps` option, while the `outputs.localPackages` option is renamed to `outputs.packages` (it now contains package metadata, including packages and its executables).
- #148: Remove automatic hpack->cabal generation. Use `pre-commit-hooks.nix` instead.
- #149: Fix unnecessary re-runs of cabal2nix evaluation. Add a `debug` option to enable produce verbose diagnostic messages.
- #149: Fix unnecessary re-runs of cabal2nix evaluation. Add a `debug` option to have haskell-flake produce diagnostic messages.
## 0.2.0 (Mar 13, 2023)

View File

@ -18,7 +18,6 @@ in
let
appType = import ./types/app-type.nix { inherit pkgs lib; };
haskellOverlayType = import ./types/haskell-overlay-type.nix { inherit lib; };
log = import ./logging.nix { };
hlsCheckSubmodule = types.submodule {
options = {
@ -189,7 +188,10 @@ in
specialArgs = { inherit pkgs self; };
modules = [
./haskell-project.nix
({ config, ... }:
({ config, name, ... }:
let
log = import ./logging.nix { inherit (config) debug; };
in
{
options = {
projectRoot = mkOption {
@ -286,9 +288,12 @@ in
'';
};
in
lib.mapAttrs
(_: path: { root = path; })
(haskell-parsers.findPackagesInCabalProject config.projectRoot);
lib.pipe config.projectRoot [
haskell-parsers.findPackagesInCabalProject
(x: log.traceDebug "config.haskellProjects.${name}.packages = ${builtins.toJSON x}" x)
(lib.mapAttrs (_: path: { root = path; }))
];
defaultText = lib.literalMD "autodiscovered by reading `self` files.";
};
devShell = mkOption {