Skip to content

Update building-the-node-using-nix.md #4613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions doc/getting-started/building-the-node-using-nix.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ To improve build speed, it is possible to set up a binary cache maintained by IO
optional**):
```
sudo mkdir -p /etc/nix
cat <<EOF | sudo tee /etc/nix/nix.conf
substituters = https://cache.nixos.org https://hydra.iohk.io
trusted-public-keys = iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
cat <<EOF | sudo tee -a /etc/nix/nix.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fix the caches in this file?;we no longer use iohk.cachix.org. and the substituter should be cache.iog.io now (but the key still has hydra in the name)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think I understood correctly. I updated the commit.

substituters = https://cache.nixos.org https://cache.iog.io
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
EOF
```

### Building and running with nix

Once Nix is installed, log out and then log back in then:
Once Nix is installed, log out and then log back in.
After that you can build the full node package with Mainnet configuration as follows:
```
git clone https://github.com/input-output-hk/cardano-node
cd cardano-node
Expand All @@ -44,6 +45,10 @@ or run in in one go:
nix run github:input-output-hk/cardano-node#mainnet/node
```

If you only want to build just the cardano-node executable, without the configuration bundle:
```
nix build .#cardano-node -o cardano-node-build
```
To build the cardano-cli executable, follow the steps below:
```
nix build .#cardano-cli -o cardano-cli-build
Expand All @@ -54,7 +59,7 @@ Or run directly, eg.:
nix run .#cardano-cli -- version
```

### Developpment environments
### Development environments

A shell environment with pre-compiled, cached, cabal dependencies is available with:
```
Expand Down