Skip to content

Commit b1ccb26

Browse files
committed
New formula: consensus-db-tools
1 parent 308df53 commit b1ccb26

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

Formula/consensus-db-tools.rb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
class ConsensusDbTools < Formula
2+
desc "Tools to inspect and manipulate the Cardano node's chainDB and ledger databases"
3+
homepage "https://github.com/IntersectMBO/ouroboros-consensus"
4+
url "https://github.com/IntersectMBO/ouroboros-consensus/archive/d3c4b5c029bde7b7233f6f7bbd21968b4f62b020.tar.gz"
5+
sha256 "53428c5e8c62807dbaf97a9f201b702de2dc942e8b81661482d0a3c5f8d69994"
6+
license "Apache-2.0"
7+
8+
depends_on "ghcup" => :build
9+
depends_on "pkg-config" => :build
10+
depends_on "gmp"
11+
depends_on "lmdb"
12+
depends_on "notunrandom/cardano/blst"
13+
depends_on "notunrandom/cardano/libsodium-cardano"
14+
depends_on "notunrandom/cardano/secp256k1@0.3.2"
15+
16+
def install
17+
ENV["GHCUP_INSTALL_BASE_PREFIX"] = buildpath
18+
system "ghcup", "install", "ghc", "9.6.7"
19+
system "ghcup", "install", "cabal", "3.12.1.0"
20+
ENV.prepend_path "PATH", buildpath/".ghcup/bin"
21+
ENV.prepend_path "PKG_CONFIG_PATH", Formula["notunrandom/cardano/secp256k1@0.3.2"].opt_lib/"pkgconf"
22+
File.write("cabal.project.local", "with-compiler: ghc-9.6.7")
23+
system "cabal", "update"
24+
system "cabal", "build", "exe:db-analyser"
25+
system "cabal", "v2-install", *std_cabal_v2_args, "exe:db-analyser"
26+
end
27+
28+
test do
29+
system bin/"db-analyser", "--help"
30+
end
31+
end

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Cardano Homebrew tap
22

3-
This is a Homebrew tap to install the Cardano node (more tools coming soon).
3+
This is a Homebrew tap to install the Cardano node, and some associated tools.
44

55
[![Demo](https://img.youtube.com/vi/Yd2lQGLwqgI/0.jpg)](https://www.youtube.com/watch?v=Yd2lQGLwqgI)
66

7-
87
## Prerequisites
98

109
You only need to have previously installed [Homebrew](https://brew.sh/), which supports MacOS and Linux.
@@ -19,7 +18,20 @@ To install the Cardano node (10.6.1) and CLI:
1918
brew install notunrandom/cardano/cardano-node
2019
```
2120

22-
Alternatively, to install only the C libraries upon which the Haskell code of the node depends (e.g. because you are developing for Cardano):
21+
To install these tools to analyse, manipulate or generate chain and ledger DB's:
22+
23+
* `db-analyser`
24+
* `snapshot-converter`
25+
* `db-synthesizer`
26+
* `db-truncater`
27+
* `db-immutaliser`
28+
* `immdb-server`
29+
30+
```bash
31+
brew install notunrandom/cardano/consensus-db-tools
32+
```
33+
34+
To install only the C libraries upon which the Haskell code of the node depends (e.g. because you are developing for Cardano):
2335

2436
```bash
2537
brew tap notunrandom/cardano

0 commit comments

Comments
 (0)