1
- # Building Cardano Node with nix
1
+ # Building Cardano node with Nix
2
2
3
3
The [ Nix Package Manager] [ nix ] can be installed on most Linux distributions by downloading and
4
4
running the installation script:
@@ -9,7 +9,7 @@ chmod +x install-nix.sh
9
9
```
10
10
and following the directions.
11
11
12
- Then the [ Flake] [ flake ] feature of nix (and IFD support) should be enabled:
12
+ Then the [ Flake] [ flake ] feature of Nix (and IFD support) should be enabled:
13
13
```
14
14
sudo mkdir -p /etc/nix
15
15
cat <<EOF | sudo tee /etc/nix/nix.conf
@@ -18,7 +18,7 @@ allow-import-from-derivation = true
18
18
EOF
19
19
```
20
20
21
- #### IOHK Binary Cache
21
+ #### IOHK binary cache
22
22
23
23
To improve build speed, it is possible to set up a binary cache maintained by IOHK (** this is
24
24
optional** ):
@@ -30,22 +30,24 @@ trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
30
30
EOF
31
31
```
32
32
33
- ### Building and running with nix
33
+ ### Building and running with Nix
34
+
35
+ Once Nix is installed, log out and log back in.
36
+ You can then build the full node package using mainnet configuration as follows:
34
37
35
- Once Nix is installed, log out and then log back in.
36
- After that you can build the full node package with Mainnet configuration as follows:
37
38
```
38
39
git clone https://github.com/input-output-hk/cardano-node
39
40
cd cardano-node
40
41
nix build .#mainnet/node -o mainnet-node-local
41
42
./mainnet-node-local/bin/cardano-node-mainnet
42
43
```
43
- or run in in one go:
44
+ or run it in one go:
44
45
```
45
46
nix run github:input-output-hk/cardano-node#mainnet/node
46
47
```
47
48
48
- If you only want to build just the cardano-node executable, without the configuration bundle:
49
+ To build just the cardano-node executable without the configuration bundle:
50
+
49
51
```
50
52
nix build .#cardano-node -o cardano-node-build
51
53
```
@@ -54,7 +56,7 @@ To build the cardano-cli executable, follow the steps below:
54
56
nix build .#cardano-cli -o cardano-cli-build
55
57
./cardano-cli-build/bin/cardano-cli
56
58
```
57
- Or run directly, eg. :
59
+ Or run directly, for example :
58
60
```
59
61
nix run .#cardano-cli -- version
60
62
```
@@ -65,7 +67,7 @@ A shell environment with pre-compiled, cached, cabal dependencies is available w
65
67
```
66
68
nix develop
67
69
```
68
- An environment with dependencies compiled with profiling enabled is available with:
70
+ An environment with dependencies compiled with enabled profiling is available with:
69
71
```
70
72
nix develop .#profiled
71
73
```
0 commit comments