-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
43 lines (41 loc) · 1.27 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
};
outputs = inputs:
let
defDevShell = compiler: {
mkShellArgs.name = "${compiler}";
hoogle = false;
tools = _: {
haskell-language-server = null;
hlint = null;
ghcid = null;
};
};
in
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
imports = [ inputs.haskell-flake.flakeModule ];
perSystem = { self', pkgs, config, ... }: {
packages.default = self'.packages.ghc98-symparsec;
devShells.default = self'.devShells.ghc98;
haskellProjects.ghc910 = {
basePackages = pkgs.haskell.packages.ghc910;
devShell = defDevShell "ghc910";
# https://github.com/phadej/defun/pull/5
settings.defun-core.jailbreak = true;
};
haskellProjects.ghc98 = {
basePackages = pkgs.haskell.packages.ghc98;
devShell = defDevShell "ghc98";
};
haskellProjects.ghc96 = {
basePackages = pkgs.haskell.packages.ghc96;
devShell = defDevShell "ghc96";
};
};
};
}