forked from kadena-io/chainweb-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
112 lines (96 loc) · 3.82 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{ compiler ? "ghc8107"
, rev ? "7a94fcdda304d143f9a40006c033d7e190311b54"
, sha256 ? "0d643wp3l77hv2pmg2fi7vyxn4rwy0iyr8djcw1h5x72315ck9ik"
, pkgs ?
import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
inherit sha256; }) {
config.allowBroken = false;
config.allowUnfree = true;
}
, returnShellEnv ? false
, mkDerivation ? null
}:
let gitignoreSrc = import (pkgs.fetchFromGitHub {
owner = "hercules-ci";
repo = "gitignore";
rev = "9e80c4d83026fa6548bc53b1a6fab8549a6991f6";
sha256 = "04n9chlpbifgc5pa3zx6ff3rji9am6msrbn1z3x1iinjz2xjfp4p";
}) {};
nix-thunk = import ./deps/nix-thunk {};
in
pkgs.haskell.packages.${compiler}.developPackage {
name = "chainweb-data";
root = gitignoreSrc.gitignoreSource ./.;
overrides = self: super: with pkgs.haskell.lib;
let gargoylePkgs = import ./deps/gargoyle { haskellPackages = self; };
in {
inherit (gargoylePkgs) gargoyle gargoyle-postgresql;
statistics = self.callHackageDirect {
pkg = "statistics";
ver = "0.15.2.0";
sha256 = "1sg1gv2sc8rdsl6qby6p80xv3iasy6w2khbkc6cx7j2iva67v33r";
} {};
direct-sqlite = self.callHackageDirect {
pkg = "direct-sqlite";
ver = "2.3.27";
sha256 = "0w8wj3210h08qlws40qhidkscgsil3635zk83kdlj929rbd8khip";
} {};
pretty-simple = dontCheck (self.callHackageDirect {
pkg = "pretty-simple";
ver = "3.3.0.0";
sha256 = "19zwzzvjgadmzp9gw235bsr6wkljr8k0cqy75h5q8n0d5m60ip7m";
} {});
resource-pool = self.callHackageDirect {
pkg = "resource-pool";
ver = "0.3.0.0";
sha256 = "0bpf868b6kq1g83s3sad26kfsawmpd3j0xpkyab8370lsq6zhcs1";
} {};
pact = appendConfigureFlag super.pact "-f-build-tool";
chainweb-api = doJailbreak super.chainweb-api;
chainweb-storage = dontCheck super.chainweb-storage;
beam-automigrate = doJailbreak super.beam-automigrate;
beam-core = doJailbreak super.beam-core;
beam-migrate = doJailbreak super.beam-migrate;
beam-postgres = doJailbreak super.beam-postgres;
hashable = doJailbreak super.hashable;
rebase = doJailbreak super.rebase;
streaming-events = unmarkBroken (doJailbreak super.streaming-events);
tmp-postgres = dontCheck (doJailbreak super.tmp-postgres);
token-bucket = unmarkBroken super.token-bucket;
# Cuckoo tests fail due to a missing symbol
cuckoo = dontCheck super.cuckoo;
# These tests pull in unnecessary dependencies
http2 = dontCheck super.http2;
prettyprinter = dontCheck super.prettyprinter;
aeson = dontCheck super.aeson;
generic-data = dontCheck super.generic-data;
};
source-overrides = {
beam-automigrate = nix-thunk.thunkSource ./deps/beam-automigrate;
chainweb-api = nix-thunk.thunkSource ./deps/chainweb-api;
pact = nix-thunk.thunkSource ./deps/pact;
OneTuple = "0.3";
aeson = "1.5.6.0";
ansi-terminal = "0.11.3";
prettyprinter-ansi-terminal = "1.1.2";
time-compat = "1.9.5";
trifecta = "2.1.1";
unordered-containers = "0.2.15.0";
http-client = "0.6.4.1";
http-client-tls = "0.3.5.3";
retry = "0.8.1.2";
# These are required in order to not break payload validation
base16-bytestring = "0.1.1.7";
prettyprinter = "1.6.0";
hashable = "1.3.0.0";
base64-bytestring = "1.0.0.3";
};
modifier = drv: pkgs.haskell.lib.overrideCabal drv (attrs: {
buildTools = (attrs.buildTools or []) [
pkgs.zlib
pkgs.haskell.packages.${compiler}.cabal-install
];
});
inherit returnShellEnv;
}