aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-12-15 22:14:51 +0530
committerAkshay Nair <phenax5@gmail.com>2024-12-15 23:53:13 +0530
commit9842a86563058cc04dc06cd07fcede688c36d8df (patch)
tree9e975f31633b31acdcfba49db2d78ceb8e7f9afb /flake.nix
parenta94f867fdba27211700eccb3f4acdba7041bdb68 (diff)
downloadchelleport-9842a86563058cc04dc06cd07fcede688c36d8df.tar.gz
chelleport-9842a86563058cc04dc06cd07fcede688c36d8df.zip
Add embedding of font
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix60
1 files changed, 39 insertions, 21 deletions
diff --git a/flake.nix b/flake.nix
index e5ba93a..c7c2058 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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
+ ];
+ };
};
- };
};
}