forked from runtimeverification/haskell-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
48 lines (46 loc) · 1.25 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
{ profiling ? false }:
let
sources = import ./nix/sources.nix;
haskell-nix = import sources."haskell.nix" {};
nixpkgs =
let
inherit (haskell-nix) nixpkgsArgs;
args = nixpkgsArgs // {
overlays =
(nixpkgsArgs.overlays or [])
++ [ (import ./nix/ghcide.nix { inherit sources; }) ]
++ [ (import ./nix/stylish-haskell.nix { inherit sources; }) ]
;
config =
(nixpkgsArgs.config or {})
;
};
in import haskell-nix.sources.nixpkgs-1909 args;
pkgs = nixpkgs;
project =
pkgs.haskell-nix.stackProject {
src = pkgs.haskell-nix.haskellLib.cleanGit { name = "kore"; src = ./.; };
modules = [
{
# package *
enableLibraryProfiling = true;
profilingDetail = "none";
# package kore
packages.kore = {
enableLibraryProfiling = profiling;
enableExecutableProfiling = profiling;
profilingDetail = "toplevel-functions";
};
}
];
};
shell = import ./shell.nix { inherit default; };
default =
{
inherit pkgs project;
cache = [
pkgs.haskell-nix.haskellNixRoots
(pkgs.haskell-nix.withInputs shell)
];
};
in default