diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-15 22:14:51 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-15 23:53:13 +0530 |
| commit | 9842a86563058cc04dc06cd07fcede688c36d8df (patch) | |
| tree | 9e975f31633b31acdcfba49db2d78ceb8e7f9afb /flake.nix | |
| parent | a94f867fdba27211700eccb3f4acdba7041bdb68 (diff) | |
| download | chelleport-9842a86563058cc04dc06cd07fcede688c36d8df.tar.gz chelleport-9842a86563058cc04dc06cd07fcede688c36d8df.zip | |
Add embedding of font
Diffstat (limited to '')
| -rw-r--r-- | flake.nix | 60 |
1 files changed, 39 insertions, 21 deletions
@@ -11,8 +11,8 @@ inputs.haskell-flake.flakeModule ]; - perSystem = { self', pkgs, lib, config, ... }: { - haskellProjects.default = { + perSystem = { self', pkgs, lib, config, ... }: + let projectRoot = builtins.toString (lib.fileset.toSource { root = ./.; fileset = lib.fileset.unions [ @@ -22,30 +22,48 @@ ./chelleport.cabal ]; }); + otherFiles = [ + { source = ./static; target = "static"; } + ]; + in { + haskellProjects.default = { + inherit projectRoot; - packages = {}; - settings = {}; + packages = {}; + settings = { + chelleport = { + deadCodeElimination = true; + staticLibraries = true; + # extraBuildFlags = ["+release"]; + strip = true; + custom = drv: 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; - }; + devShell = { + # tools = hp: { fourmolu = hp.fourmolu; ghcid = null; }; + hlsCheck.enable = false; + }; - autoWire = [ "packages" "apps" "checks" ]; - }; + autoWire = [ "packages" "apps" "checks" ]; + }; - packages.default = self'.packages.chelleport; - apps.default = self'.apps.chelleport; + packages.default = self'.packages.chelleport; + apps.default = self'.apps.chelleport; - devShells.default = pkgs.mkShell { - inputsFrom = [ - config.haskellProjects.default.outputs.devShell - ]; - packages = with pkgs; [ - just - nodemon - ]; + devShells.default = pkgs.mkShell { + inputsFrom = [ + config.haskellProjects.default.outputs.devShell + ]; + packages = with pkgs; [ + just + nodemon + ]; + }; }; - }; }; } |
