forked from runtimeverification/haskell-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
59 lines (51 loc) · 1.39 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
47
48
49
50
51
52
53
54
55
56
57
58
59
{ profiling ? false
, release ? false
, threaded ? !profiling
}:
let
sources = import ./nix/sources.nix;
pkgs =
let
haskell-nix = import sources."haskell.nix" {};
inherit (haskell-nix) nixpkgsArgs;
args = nixpkgsArgs // { };
in import haskell-nix.sources.nixpkgs-2003 args;
local =
if builtins.pathExists ./local.nix
then import ./local.nix { inherit default; }
else x: x;
project =
(args: pkgs.haskell-nix.stackProject (local args)) {
src = pkgs.haskell-nix.haskellLib.cleanGit { name = "kore"; src = ./.; };
modules = [
{
# package *
enableLibraryProfiling = true;
profilingDetail = "none";
# package kore
packages.kore = {
flags = {
inherit release threaded;
};
enableLibraryProfiling = profiling;
enableExecutableProfiling = profiling;
profilingDetail = "toplevel-functions";
};
}
];
};
shell = import ./shell.nix { inherit default; };
version = project.kore.components.exes.kore-exec.version;
default =
{
inherit pkgs project;
cache = [
project.roots
(pkgs.haskell-nix.withInputs shell)
];
kore = pkgs.symlinkJoin {
name = "kore-${version}";
paths = pkgs.lib.attrValues project.kore.components.exes;
};
};
in default