Comment on page
Cronosd build with Nix
It is also possible to reproducibly build
cronosdbinaries locally yourself using nix.
Below are listed the different possible parameters
- Network Type
- DB Backend
- Build Type
- normal nix package (default)
- re-distributable bundle
- re-distributable tarball, the tarball of the above bundle.
The package name is constructed by joining the above three properties with a separator
-, omitting the default values, for example:
cronosd:defaults to the
The nix flake url is:
github:crypto-org-chain/cronos/$TAG_NAME#$PACKAGE_NAME, replace the
$PACKAGE_NAMEto the one you needed, for example: The full command to build a
mainnetre-distributable tarball is:
nix build github:crypto-org-chain/cronos/v0.8.1#cronosd-tarball
result -> /nix/store/dlhqc2ii8jj1ryrgki90l6j92r2by06g-bundle-cronosd-v0.8.1
The result will reside in
./resultby default, you can copy the tarball to other machines with the same OS and arch. The re-distributable bundle/tarball has dynamic libraries included, no extra runtime dependencies are needed.
tar xfz ./result -C /tmp/cronosd/
If you get
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override, e.g. by adding:
To keep the tarball redistributable, it has all the runtime dependencies included, the dynamic linker, and the shared libraries. They are located in a relative path, so it's important that the whole package is moved together.
bin/cronosd:the entry point, it's a wrapper script that executes the binary using the included dynamic linker.
lib/:all the shared libraries.