-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
54 lines (46 loc) · 1.66 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
description = "Kosem - typed SQL and relational mapping for Haskell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [ inputs.haskell-flake.flakeModule ];
perSystem = { self', inputs', pkgs, system, config, lib, ... }: {
haskellProjects.default = {
devShell = {
enable = true;
tools = hp: { fourmolu = hp.fourmolu; };
hlsCheck.enable = true;
};
autoWire = [ "packages" "apps" "checks" ];
settings.haskell-language-server.custom = with pkgs.haskell.lib.compose; lib.flip lib.pipe [
(disableCabalFlag "ormolu")
# (drv: drv.override { hls-ormolu-plugin = null; })
];
};
packages.default = self'.packages.kosem-postgresql;
devShells.default = pkgs.mkShell {
name = "Kosem";
meta.description = "Kosem dev shell";
# See https://zero-to-flakes.com/haskell-flake/devshell#composing-devshells
inputsFrom = [
config.haskellProjects.default.outputs.devShell
#config.treefmt.build.devShell
];
nativeBuildInputs = with pkgs; [
typos
just
postgresql
];
shellHook = ''
cat scripts/shell-welcome.txt
'';
};
};
};
}