-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
85 lines (80 loc) · 2.7 KB
/
flake.nix
File metadata and controls
85 lines (80 loc) · 2.7 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
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 @ {
self,
nixpkgs,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [inputs.haskell-flake.flakeModule];
perSystem = {
self',
pkgs,
...
}: {
# Typically, you just want a single project named "default". But
# multiple projects are also possible, each using different GHC version.
haskellProjects.default = {
# The base package set representing a specific GHC version.
# By default, this is pkgs.haskellPackages.
# You may also create your own. See https://community.flake.parts/haskell-flake/package-set
basePackages = pkgs.haskell.packages.ghc910;
# Extra package information. See https://community.flake.parts/haskell-flake/dependency
#
# Note that local packages are automatically included in `packages`
# (defined by `defaults.packages` option).
#
# packages = {
# hlint.source = "3.8";
# };
settings = {
# aeson = {
# check = false;
# };
# relude = {
# haddock = false;
# broken = false;
# };
};
devShell = {
# Enabled by default
enable = true;
# Programs you want to make available in the shell.
# Default programs can be disabled by setting to 'null'
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; };
tools = hp: {
inherit
(pkgs)
just
nixd
alejandra
zlib
pkg-config
;
inherit
(hp)
# Note:
# cabal-install, haskell-language-server, ghcid, hlint
# are all installed by `haskell-flake` by default:
# @see https://github.com/srid/haskell-flake/blob/master/nix/modules/project/defaults.nix#L25-L28
ghcide
cabal-fmt
cabal-gild
fourmolu
;
};
# Check that haskell-language-server works
# hlsCheck.enable = true; # Requires sandbox to be disabled
};
};
# haskell-flake doesn't set the default package, but you can do it here.
packages.default = self'.packages.tick-tock-tui;
};
};
}