From e5e8c9e2739d01295c6cb5de3d530de7479a5a61 Mon Sep 17 00:00:00 2001 From: Paul d'Aoust Date: Fri, 2 Feb 2024 11:37:09 -0800 Subject: [PATCH 1/3] instructions on getting a specific holonix version (plus a capitalisation fix) --- src/pages/get-started/install-advanced.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pages/get-started/install-advanced.md b/src/pages/get-started/install-advanced.md index 69b320dc3..e156f0bc1 100644 --- a/src/pages/get-started/install-advanced.md +++ b/src/pages/get-started/install-advanced.md @@ -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 `. This example gives you the newest release in the unstable 0.2.x series: + +```shell +nix develop --override-input versions ./versions/0_2 .#holonix +``` + +And this example gives you the newest weekly developer snapshot: + +```shell +nix develop --override-input versions ./versions/weekly .#holonix +``` + +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. + #### 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. @@ -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. From 94a11e89d59613b1f3d486acd9dc262984da800b Mon Sep 17 00:00:00 2001 From: Paul d'Aoust Date: Thu, 22 Feb 2024 07:57:19 -0800 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: ThetaSinner --- src/pages/get-started/install-advanced.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/get-started/install-advanced.md b/src/pages/get-started/install-advanced.md index e156f0bc1..b363f8738 100644 --- a/src/pages/get-started/install-advanced.md +++ b/src/pages/get-started/install-advanced.md @@ -25,19 +25,19 @@ 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 `. This example gives you the newest release in the unstable 0.2.x series: +To get an ad-hoc shell with a specific version of Holochain, use the flag `--override-input versions `. This example gives you the newest release in the unstable 0.2.x series: ```shell -nix develop --override-input versions ./versions/0_2 .#holonix +nix develop --override-input versions "github:holochain/holochain?dir=versions/0_2" "github:holochain/holochain#holonix" ``` And this example gives you the newest weekly developer snapshot: ```shell -nix develop --override-input versions ./versions/weekly .#holonix +nix develop --override-input versions "github:holochain/holochain?dir=versions/weekly" "github:holochain/holochain#holonix" ``` -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. +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 to use in the above command, and the `flake.nix` file inside the subfolder shows the specific release tags that will be used for Holochain and the Lair Keystore. The launcher and scaffolding tools live in separate repos, so you will get the latest release of those tools that are available on their respective release branches referenced in the version-specific `flake.nix` file. Note that you may temporarily see older versions than the current tip of the referenced release branch because our automation updates the `flake.lock` separately, so that file is the absolute source of truth for what versions you will get. #### Enabling Flake features on your system From fa26a9890e9024b10b6f1814811fc33e5b2aa962 Mon Sep 17 00:00:00 2001 From: Paul d'Aoust Date: Thu, 22 Feb 2024 10:36:34 -0800 Subject: [PATCH 3/3] be specific about version numbers --- src/pages/get-started/install-advanced.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/get-started/install-advanced.md b/src/pages/get-started/install-advanced.md index b363f8738..886d84e26 100644 --- a/src/pages/get-started/install-advanced.md +++ b/src/pages/get-started/install-advanced.md @@ -25,13 +25,13 @@ The flake-based one-liner to get you an ad-hoc Holonix shell looks like this: nix develop github:holochain/holochain#holonix ``` -To get an ad-hoc shell with a specific version of Holochain, use the flag `--override-input versions `. This example gives you the newest release in the unstable 0.2.x series: +By default, the above one-liner will give you the latest recommended release (currently from the 0.2.x series). To get an ad-hoc shell with a specific version of Holochain, use the flag `--override-input versions `. This example gives you the next release candidate in the 0.2.x series: ```shell -nix develop --override-input versions "github:holochain/holochain?dir=versions/0_2" "github:holochain/holochain#holonix" +nix develop --override-input versions "github:holochain/holochain?dir=versions/0_2_rc" "github:holochain/holochain#holonix" ``` -And this example gives you the newest weekly developer snapshot: +And this example gives you the newest weekly developer snapshot (currently from the 0.3.x series): ```shell nix develop --override-input versions "github:holochain/holochain?dir=versions/weekly" "github:holochain/holochain#holonix"