Holochain Upgrade 0.1 → 0.2
For existing hApps that have been written for Holochain version 0.1, these are steps to upgrade to Holochain version 0.2.
Steps to upgrade Nix flake from Holochain version 0.1 to 0.2
Note
The following steps only apply to Nix flakes that have been either generated by the Holochain scaffolding tool or follow the recommended format as described in Dev Tools Setup.
In the root folder of the hApp to be upgraded execute the following command in a terminal:
nix run nixpkgs#gnused -- -i 's/dir=versions\/0_1/dir=versions\/0_2/g' flake.nix
Alternatively open flake.nix
in an editor. It should look like this:
{
description = "My hApp";
inputs = {
nixpkgs.follows = "holonix/nixpkgs";
versions.url = "github:holochain/holochain?dir=versions/0_1";
holonix.url = "github:holochain/holochain";
holonix.inputs.versions.follows = "versions";
};
...
}
Change this line
versions.url = "github:holochain/holochain?dir=versions/0_1";
to
versions.url = "github:holochain/holochain?dir=versions/0_2";
Nix flake for Holochain v0.2
The flake.nix
for Holochain version 0.2 looks like this:
{
description = "My hApp";
inputs = {
nixpkgs.follows = "holonix/nixpkgs";
versions.url = "github:holochain/holochain?dir=versions/0_2";
holonix.url = "github:holochain/holochain";
holonix.inputs.versions.follows = "versions";
};
...
}
Before building the dev shell, make sure to update the flake’s input sources:
nix flake update
Now you can build and execute the dev shell:
nix develop