From 87815edbab70302793fb83259fedc1ae9004d172 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 21 Dec 2024 16:37:24 +0530 Subject: Optimize initialization time --- flake.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 4ede626..c28bd0e 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,7 @@ otherFiles = [ { source = ./static; target = "static"; } ]; + configurationFlags = [ "--ghc-options=-O2" ]; in { haskellProjects.default = { inherit projectRoot; @@ -32,20 +33,21 @@ packages = {}; settings = { chelleport = { + check = true; deadCodeElimination = true; staticLibraries = true; - # extraBuildFlags = ["+release"]; strip = true; - custom = drv: drv.overrideAttrs(old: { - preBuild = '' - ${toString (map (f: ''cp -r ${f.source} ${f.target};'') otherFiles)} - ''; - }); + custom = drv: + (pkgs.haskell.lib.compose.appendConfigureFlags configurationFlags drv).overrideAttrs (old: { + preBuild = '' + ${toString (map (f: ''cp -r ${f.source} ${f.target};'') otherFiles)} + ''; + }) + ; }; }; devShell = { - # tools = hp: { fourmolu = hp.fourmolu; ghcid = null; }; hlsCheck.enable = false; }; -- cgit v1.3.1