Hacking with Nix
The nix/
folder contains helper scripts for working with the ledger via Nix.
nix/install.sh
will install both the wallet and baking apps. Use
nix/install.sh s baking
to install just the baking app or
nix/install.sh s wallet
to install just the wallet.
Use nix/env.sh <s or x>
to enter a shell where you can run make
and it will just work. You can also pass a command instead, e.g. nix/env.sh s --run "make clean SHELL=bash"
. All make
commands should be prefixed with SHELL=bash
. Check the Makefile to see what options exist
For development, use nix/watch.sh s make APP=<tezos_baking|tezos_wallet>
to incrementally build on every change. Be sure to nix/env.sh s --run "make clean SHELL=bash"
if you start watching a different APP
.
Set DEBUG=1
in the Makefile
to so that the user-defined parse_error()
macro provides a line-number. For printf
style debugging see Ledger's official instructions
To do a full Nix build run nix/build.sh
. You can pass nix-build
arguments to this to build specific attributes, e.g. nix/build.sh -A nano.s.wallet
.
Set environment variable TEZOS_LOG="client.signer.ledger -> debug"
when running tezos-client to get the byte-level IO being sent
directly to/from the ledger
- Install
llvm-vs-code-extensions.vscode-clangd
extension. - Run
nix/setup-vscode.sh
to create local configuration. Note that these files are non-relocatable so you need to rerun this if you move the directory. - Restart Visual Studio Code.
nix/build.sh -A nano.s.release.all
nix/build.sh -A nano.x.release.all
See test/README.md