Hey all, it is already possible to have default.nix
and config.nix
files in your projects to lock the holochain version.
- Copy the
config.nix
anddefault.nix
from this example into your project. - Rename them to usual
config.nix
anddefault.nix
. - Change the
"ref"
field inconfig.nix
to “love”. - Edit the
"hash"
by changing any letter of it to bypass cache, and try to donix-shell
in the same folder in which you have created the files. - Executing
nix-shell
will give an error, so get the hash that was wanted and paste that in the"hash"
field in theconfig.nix
file. - Execute
nix-shell
again, and you should have RSM installed. Try runningholochain --version
Voila! Commit, push, and you have environment setup for anyone working with this repository.
Notice that this will be pointing to the love branch of the holonix repository, so whenever a new change is made there, any new clean download of nix-shell will download a new holochain version.
To find out which holochain commit this refers to, you can run this:
nix eval -f https://holochain.love pkgs.holochain.src.rev
Just found out that this can be done already and I know that helps immensely in projects.
Props to @steveeJ for the hard work.