-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.nix
46 lines (39 loc) · 1.49 KB
/
default.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
{ system ? builtins.currentSystem
, crossSystem ? null
# allows to cutomize haskellNix (ghc and profiling, see ./nix/haskell.nix)
, config ? {}
# allows to override dependencies of the project without modifications,
# eg. to test build against local checkout of tbco-nix:
# nix build -f default.nix bcc-node --arg sourcesOverride '{
# tbco-nix = ../tbco-nix;
# }'
, sourcesOverride ? {}
# pinned version of nixpkgs augmented with overlays (tbco-nix and our packages).
, pkgs ? import ./nix { inherit system crossSystem config sourcesOverride; }
, gitrev ? pkgs.tbcoNix.commitIdFromGitRepoOrZero ./.git
}:
with pkgs; with commonLib;
let
haskellPackages = recRecurseIntoAttrs
# we are only interested in listing the project packages:
(selectProjectPackages tbcoMonitoringHaskellPackages);
self = {
inherit haskellPackages;
inherit (haskellPackages.tbco-monitoring.identifier) version;
# `tests` are the test suites which have been built.
tests = collectComponents' "tests" haskellPackages;
# `benchmarks` (only built, not run).
benchmarks = collectComponents' "benchmarks" haskellPackages;
libs = collectComponents' "library"
(removeAttrs haskellPackages ["lobemo-examples"]);
exes = collectComponents' "exes" haskellPackages;
checks = recurseIntoAttrs {
# `checks.tests` collect results of executing the tests:
tests = collectChecks haskellPackages;
};
shell = import ./shell.nix {
inherit pkgs;
withHoogle = true;
};
};
in self