-
Notifications
You must be signed in to change notification settings - Fork 198
/
flake.nix
71 lines (67 loc) · 2.16 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/haskell-updates";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
flake-root.url = "github:srid/flake-root";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
imports = [
inputs.haskell-flake.flakeModule
inputs.flake-root.flakeModule
];
perSystem = { self', system, lib, config, pkgs, ... }: {
# The "main" project. You can have multiple projects, but this template
# has only one.
packages.default = config.packages.hackage-server;
haskellProjects.default = {
settings = {
hackage-server.check = false;
heist.check = false;
threads.check = false;
};
packages = {
Cabal.source = "3.10.1.0";
Cabal-syntax.source = "3.10.1.0";
attoparsec-aeson.source = "2.1.0.0";
hedgehog.source = "1.3";
};
devShell = {
tools = hp: {
# Setting to null should remove this tool from defaults.
haskell-language-server = null;
inherit (pkgs)
cabal-install
ghc
# https://github.com/haskell/hackage-server/pull/1219#issuecomment-1597140858
# glibc
icu67
zlib
openssl
# cryptodev
pkg-config
brotli
gd
libpng
libjpeg
fontconfig
freetype
expat
;
};
hlsCheck.enable = false;
};
};
};
};
nixConfig = {
extra-substituters = ["https://hackage-server.cachix.org/"];
extra-trusted-public-keys = [
"hackage-server.cachix.org-1:iw0iRh6+gsFIrxROFaAt5gKNgIHejKjIfyRdbpPYevY="
];
allow-import-from-derivation = "true";
};
}