-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
98 lines (86 loc) · 2.46 KB
/
shell.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
# Docs for this file: https://github.com/input-output-hk/iogx/blob/main/doc/api.md#mkhaskellprojectinshellargs
# See `shellArgs` in `mkHaskellProject` in ./project.nix for more details.
{ repoRoot
, inputs
, pkgs
, lib
, system
,
}:
# Each flake variant defined in your project.nix project will yield a separate
# shell. If no flake variants are defined, then cabalProject is the original project.
cabalProject: {
name = "plutus-script-evaluation";
packages = [
pkgs.figlet
];
scripts = {
dump = {
description = "Dump Plutus Script events from mainnet";
group = "general";
exec = ''
cabal run dump-script-events -- \
--mainnet \
--socket-path "$CARDANO_NODE_SOCKET_PATH" \
--config "$CARDANO_NODE_CONFIG_PATH" \
--events-per-file 5000 \
--event-dir dumps/events \
--checkpoint-dir dumps/checkpoints \
'';
};
load = {
description = "Load Plutus Script events into a database";
group = "general";
exec = ''
cabal run load-script-events -- \
--mainnet \
--socket-path "$CARDANO_NODE_SOCKET_PATH" \
--config "$CARDANO_NODE_CONFIG_PATH" \
--checkpoint-dir dumps/checkpoints \
--database-conn-str "$DB_CONN_STRING"
'';
};
aggregate = {
description = "Aggregate Plutus Script events from mainnet";
group = "general";
exec = ''
cabal run aggregate-script-events -- --event-dir dumps/events
'';
};
deserialise = {
description = "Deserialise Plutus Scripts from mainnet";
group = "general";
exec = ''
cabal run deserialise-scripts -- --database-conn-str "$DB_CONN_STRING"
'';
};
materialise = {
description = "Materialise database views";
group = "general";
exec = ''
cabal run materialise-views -- --database-conn-str "$DB_CONN_STRING"
'';
};
evaluate = {
description = "Evaluate Plutus Scripts from mainnet";
group = "general";
exec = ''
cabal run evaluate-scripts -- --start-block=0 --database-conn-str "$DB_CONN_STRING"
'';
};
};
# env = {
# KEY = "VALUE";
# };
shellHook = ''
figlet "Plutus Script Evaluation"
'';
preCommit = {
cabal-fmt.enable = true;
stylish-haskell.enable = false;
fourmolu.enable = true;
hlint.enable = true;
editorconfig-checker.enable = true;
nixpkgs-fmt.enable = false;
};
}