-
Notifications
You must be signed in to change notification settings - Fork 0
How to upgrade the Holochain version of a project with Nix
Guillem Córdoba edited this page Nov 24, 2021
·
8 revisions
This guide will show you how to upgrade the holochain version to the latest released one.
- Starting from this
default.nix
file in the the root folder of your project:
let
holonixRev = "f3ecb117bdd876b8dcb33ad04984c5da5b2d358c";
holonixPath = builtins.fetchTarball "https://github.com/holochain/holonix/archive/${holonixRev}.tar.gz";
holonix = import (holonixPath) {};
nixpkgs = holonix.pkgs;
in nixpkgs.mkShell {
inputsFrom = [ holonix.main ];
packages = [
# Additional packages go here
];
}
- Get the newest holonix revision:
git ls-remote https://github.com/holochain/holonix main | grep -oE '[0-9a-z]{40}'
This will give some output like this:
401b69bdb120c5a4680b03eaa3f95b011e0c5cf1
-
Replace the contents of the
holonixRev
variable with the output of the previous command. -
Re-run
nix-shell
again. -
Go into the
Cargo.toml
of your zomes and:
- Upgrade the
hdk
version: see available versions here. - Upgrade the
holo_hash
version: see available versions here.
That's it! Try to compile your hApp and fix any breaking changes from the HDK in your code.