Skip to content

Commit 48ebf15

Browse files
committed
fix(fourmolu): refer to its own settings
1 parent 9364dc0 commit 48ebf15

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

modules/hooks.nix

+12-1
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,17 @@ in
603603
};
604604
};
605605
};
606+
fourmolu = mkOption {
607+
description = "fourmolu hook";
608+
type = types.submodule {
609+
imports = [ hookModule ];
610+
options.settings.defaultExtensions = mkOption {
611+
type = types.listOf types.str;
612+
description = "Haskell language extensions to enable.";
613+
default = [ ];
614+
};
615+
};
616+
};
606617
golines = mkOption {
607618
description = "golines hook";
608619
type = types.submodule {
@@ -2630,7 +2641,7 @@ in
26302641
package = tools.fourmolu;
26312642
entry =
26322643
"${hooks.fourmolu.package}/bin/fourmolu --mode inplace ${
2633-
lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormolu.settings.defaultExtensions)
2644+
lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourmolu.settings.defaultExtensions)
26342645
}";
26352646
files = "\\.l?hs(-boot)?$";
26362647
};

0 commit comments

Comments
 (0)