-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefault.nix
54 lines (49 loc) · 1.12 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
let
sources = import ./nix/sources.nix;
in
{ pkgs ? import sources.unstable { }
, profiling ? false
}:
let
hspkgs = pkgs.haskellPackages.override {
overrides = hself: hsuper: with pkgs.haskell.lib; {
ede = overrideCabal hsuper.ede (
drv: {
src = pkgs.fetchFromGitHub {
owner = "brendanhay";
repo = "ede";
rev = "5e0373b8a8c83ff2078a938795e30ec8038d228c";
sha256 = "1lb0q289p6lrc65adlacdx8xy8hrvcywbf6np7rilqdvvnyvlbgs";
};
}
);
repology-versions = import sources.repology-versions {
inherit sources;
};
};
};
inherit (hspkgs)
callCabal2nix
;
inherit (pkgs.haskell.lib)
enableLibraryProfiling
enableExecutableProfiling
justStaticExecutables
;
inherit (pkgs)
lib
nix-gitignore
;
extra-source-excludes = [
"/.envrc"
"/shell.nix"
"/wrapper.nix"
];
nvs = callCabal2nix
"nvs"
(nix-gitignore.gitignoreSource extra-source-excludes ./.) { };
in
if profiling then
enableExecutableProfiling (enableLibraryProfiling nvs)
else
justStaticExecutables nvs