Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instructions on getting a specific holonix version #421

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/pages/get-started/install-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ The flake-based one-liner to get you an ad-hoc Holonix shell looks like this:
nix develop github:holochain/holochain#holonix
```

To get ad-hoc shell with a specific version of Holochain, use the flag `--override-input versions <version_path>`. This example gives you the newest release in the unstable 0.2.x series:
pdaoust marked this conversation as resolved.
Show resolved Hide resolved

```shell
nix develop --override-input versions ./versions/0_2 .#holonix
pdaoust marked this conversation as resolved.
Show resolved Hide resolved
```

And this example gives you the newest weekly developer snapshot:
pdaoust marked this conversation as resolved.
Show resolved Hide resolved

```shell
nix develop --override-input versions ./versions/weekly .#holonix
pdaoust marked this conversation as resolved.
Show resolved Hide resolved
```

Take a look at the [`versions/` folder in the `holochain/holochain` repository](https://github.com/holochain/holochain/tree/develop/versions) to find out what versions you can target. Each subfolder is a valid version number to use in the above command, and the `flake.nix` file inside the subfolder shows the specific release tag for each component that will be downloaded.
pdaoust marked this conversation as resolved.
Show resolved Hide resolved

#### Enabling Flake features on your system

At the time of writing, flakes are still considered an experimental in the nix world and thus require being enabled. This happens either ad-hoc on the command itself or permanently via Nix's configuration.
Expand Down Expand Up @@ -95,7 +109,7 @@ In the `outputs` set, this flake composes a dev shell that inherits its inputs f

Once the `flake.nix` is created (and added to the git repo), the lockfile can be initiliazed by running `nix flake udpate`. The resulting `flake.lock` records pinned references to all the `inputs` at the given point in time, in our case to the the `holochain-flake` and of all its inputs transitively; altogether keeping track of all the dependencies of your app's development environment.

### A Gotcha with Flakes and Git
### A gotcha with Flakes and Git

The behavior of `nix` commands that rely on a `flake.nix` as its input such as `nix develop` can be counterintuitive in a git repository.

Expand Down