-
Notifications
You must be signed in to change notification settings - Fork 22
/
default.nix
78 lines (67 loc) · 2.89 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
{ nixpkgs }:
rec {
hanalytics = nixpkgs.fetchFromGitHub {
owner = "quyse";
repo = "hanalytics";
rev = "dbe294c4c1524268683764c3cd3ec947105359c9";
sha256 = "0wpib53843xggnd70vxxivmv9cd0gqgfpia3v3f81q0vdf8mz61k";
};
packages = nixpkgs.haskellPackages.override {
overrides = let
deps = self: super: stellarPackage.extraLibs;
sourceOverrides = nixpkgs.haskell.lib.packageSourceOverrides {
coinmetrics = ./coinmetrics;
coinmetrics-all-blockchains = ./coinmetrics-all-blockchains;
coinmetrics-binance = ./coinmetrics-binance;
coinmetrics-bitcoin = ./coinmetrics-bitcoin;
coinmetrics-cardano = ./coinmetrics-cardano;
coinmetrics-cosmos = ./coinmetrics-cosmos;
coinmetrics-eos = ./coinmetrics-eos;
coinmetrics-ethereum = ./coinmetrics-ethereum;
coinmetrics-export = ./coinmetrics-export;
coinmetrics-grin = ./coinmetrics-grin;
coinmetrics-iota = ./coinmetrics-iota;
coinmetrics-monero = ./coinmetrics-monero;
coinmetrics-monitor = ./coinmetrics-monitor;
coinmetrics-nem = ./coinmetrics-nem;
coinmetrics-neo = ./coinmetrics-neo;
coinmetrics-ripple = ./coinmetrics-ripple;
coinmetrics-rosetta = ./coinmetrics-rosetta;
coinmetrics-stellar = ./coinmetrics-stellar;
coinmetrics-storage = ./coinmetrics-storage;
coinmetrics-tendermint = ./coinmetrics-tendermint;
coinmetrics-tezos = ./coinmetrics-tezos;
coinmetrics-tron = ./coinmetrics-tron;
coinmetrics-waves = ./coinmetrics-waves;
hanalytics-avro = "${hanalytics}/hanalytics-avro";
hanalytics-base = "${hanalytics}/hanalytics-base";
hanalytics-bigquery = "${hanalytics}/hanalytics-bigquery";
hanalytics-postgres = "${hanalytics}/hanalytics-postgres";
avro = "0.4.7.0";
diskhash = "0.0.4.0";
};
tweaks = self: super: with nixpkgs.haskell.lib; {
coinmetrics-stellar = super.coinmetrics-stellar.overrideAttrs (attrs: {
buildInputs = attrs.buildInputs ++ stellarPackage.includes;
});
diskhash = dontCheck super.diskhash;
};
stellarPackage = import ./coinmetrics-stellar/default.nix { inherit nixpkgs; };
in nixpkgs.lib.foldl nixpkgs.lib.composeExtensions deps [ sourceOverrides tweaks ];
};
bins = with (builtins.mapAttrs (name: pkg: nixpkgs.haskell.lib.justStaticExecutables pkg) packages); {
inherit coinmetrics-export coinmetrics-monitor;
};
env = additionalContents: nixpkgs.buildEnv {
name = "haskell-tools";
paths = builtins.attrValues bins ++ additionalContents;
};
image = { name ? "coinmetrics/haskell-tools", tag ? "latest", additionalContents ? [] }: nixpkgs.dockerTools.buildImage {
inherit name tag;
contents = [ nixpkgs.cacert ];
config = {
Env = [ "PATH=${env additionalContents}/bin" ];
User = "1000:1000";
};
};
}