aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-12-21 16:37:24 +0530
committerAkshay Nair <phenax5@gmail.com>2024-12-21 16:49:42 +0530
commit87815edbab70302793fb83259fedc1ae9004d172 (patch)
treee434cc57bff80f7e8a739db9349225f57e82d2d8 /flake.nix
parent217f38ad33811c88c63ff4c0be387e67fb0cd68a (diff)
downloadchelleport-87815edbab70302793fb83259fedc1ae9004d172.tar.gz
chelleport-87815edbab70302793fb83259fedc1ae9004d172.zip
Optimize initialization time
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix16
1 files changed, 9 insertions, 7 deletions
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;
};