-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcoffer.nix
33 lines (29 loc) · 1.03 KB
/
coffer.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
# SPDX-FileCopyrightText: 2020 Serokell <https://serokell.io>
#
# SPDX-License-Identifier: MPL-2.0
{ linux ? false, linux-static ? false, windows ? false }:
let
sources = import ./nix/sources.nix;
weeder-hacks = import sources.haskell-nix-weeder { inherit pkgs; };
nixpkgs = (import ./ci.nix).pkgs;
src = (import ./ci.nix).project-src;
pkgs = if linux-static then nixpkgs.pkgsCross.musl64 else if windows then nixpkgs.pkgsCross.mingwW64 else nixpkgs;
project = pkgs.haskell-nix.stackProject {
src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; };
modules = [{
packages.coffer = {
ghcOptions = [
"-Werror"
# produce *.dump-hi files, required for weeder
"-ddump-to-file" "-ddump-hi"
];
# collect all *.dump-hi files (required for weeder)
postInstall = weeder-hacks.collect-dump-hi-files;
# enable haddock for local packages
doHaddock = true;
};
# disable haddock for dependencies
doHaddock = false;
}];
};
in project