-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathci.nix
More file actions
72 lines (60 loc) · 2.42 KB
/
ci.nix
File metadata and controls
72 lines (60 loc) · 2.42 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
# SPDX-FileCopyrightText: 2022 Serokell <https://serokell.io>
#
# SPDX-License-Identifier: MPL-2.0
rec {
sources = import ./nix/sources.nix;
xrefcheck = import sources.xrefcheck;
haskell-nix = import sources."haskell.nix" {
sourcesOverride = { hackage = sources."hackage.nix"; stackage = sources."stackage.nix"; };
};
serokell-nix = import sources."serokell.nix";
pkgs = import sources.nixpkgs (
haskell-nix.nixpkgsArgs // {
overlays =
haskell-nix.nixpkgsArgs.overlays
++ [ serokell-nix.overlay ]; # contains trailing whitespace check
}
);
local-packages = [{
name = "coffer";
subdirectory = ".";
}];
project-src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "coffer";
src = pkgs.haskell-nix.haskellLib.cleanSourceWith {
filter = path: type: !(pkgs.lib.hasInfix "tests/golden/helpers" path);
src = ./.;
};
};
# TODO: drop this when `serokell/nixpkgs` acquires stylish-haskell >= 0.13.0.0.
pkgs-stylish = import sources.nixpkgs-stylish {};
project = (import ./coffer.nix { linux = true; });
lib = project.coffer.components.library;
cli = project.coffer.components.exes.coffer;
server = project.coffer.components.exes.coffer-server;
tests = project.coffer.components.tests.test;
server-integration = project.coffer.components.tests.server-integration;
coffer-swagger-api = project.coffer.components.exes.coffer-swagger-api;
doctests = project.coffer.components.tests.doctests;
haddock = project.coffer.components.library.haddock;
coffer-static = (import ./coffer.nix { linux-static = true; }).coffer.components.exes.coffer;
coffer-windows = (import ./coffer.nix { windows = true; }).coffer.components.exes.coffer;
trailing-whitespace-check = pkgs.build.checkTrailingWhitespace project-src;
weeder-hacks = import sources.haskell-nix-weeder { inherit pkgs; };
# nixpkgs has weeder 2, but we use weeder 1
weeder-legacy = pkgs.haskellPackages.callHackageDirect {
pkg = "weeder";
ver = "1.0.9";
sha256 = "0gfvhw7n8g2274k74g8gnv1y19alr1yig618capiyaix6i9wnmpa";
} {};
weeder-script = weeder-hacks.weeder-script {
weeder = weeder-legacy;
hs-pkgs = project;
local-packages = local-packages;
};
# stack2cabal is broken because of strict constraints, set 'jailbreak' to ignore them
stack2cabal = pkgs.haskell.lib.overrideCabal pkgs.haskellPackages.stack2cabal (drv: {
jailbreak = true;
broken = false;
});
}