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

dev tools quick-install script: Paul's changes #373

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

pdaoust
Copy link
Collaborator

@pdaoust pdaoust commented Feb 22, 2023

No description provided.

@netlify
Copy link

netlify bot commented Feb 22, 2023

Deploy Preview for hc-doc-pages-wip ready!

Name Link
🔨 Latest commit 8f1d7e4
🔍 Latest deploy log https://app.netlify.com/sites/hc-doc-pages-wip/deploys/63f674b5dede9700080277c4
😎 Deploy Preview https://deploy-preview-373--hc-doc-pages-wip.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@pdaoust pdaoust requested review from jost-s and steveej February 22, 2023 19:51
Copy link
Member

@steveej steveej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing this up 🙌 small nitpick favoring an OSS version 😊

src/pages/get-building/install-advanced.md Outdated Show resolved Hide resolved
@pdaoust
Copy link
Collaborator Author

pdaoust commented Feb 22, 2023

@jost-s @steveej requesting your review on this, especially the bit about working offline in dfe7dee e1e36e4.


If you want to re-enter the shell to do more work, or create multiple terminals to work in, you'll need to re-enter the `nix develop` in each new instance. The packages are cached locally on your machine, so they will be ready the next time you enter the shell. You do need to get the package configuration files from somewhere, though. If you use the Holochain repo cloning method, they're cached on your machine too, but the ['quick install'](../install/) and ['using a specific version'](#using-a-specific-version-of-the-development-tools) methods require an internet connection every time you want to enter the shell.
If you want to do more work, or create multiple terminals to work in, you'll need to re-enter the `nix develop` shell in each new instance. The packages are cached locally on your machine, so they will be ready the next time you enter the shell. If you follow the practices above to create a per-project `flake.nix` file, you can work completely offline, but you need an internet connection in order to enter the [ad-hoc shell](#holonix%27s-usage-of-nix%27s-flakes-features). If you're going to be working offline, you can [download a snapshot of the holochain GitHub repository](https://github.com/holochain/holochain/archive/refs/heads/develop.zip) and enter the shell once using the contained `flake.nix`. After that, the packages will be cached and you can continue to use this flake for ad-hoc shells.
Copy link
Member

@steveej steveej Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-reading this it's actually somewhat confusing. specifically, in my mind the offline instructions mentioning the snapshot and its flake.nix blur into setting up a custom flake.nix and working offline with that. this paragraph just seems to try to cram too much information in it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, fair enough. Is there a skeleton flake.nix that we can put there instead?

And also -- is it actually true that this is all you need in order to work offline? Just have a local flake.nix and enter it once while you're online?

Copy link
Collaborator Author

@pdaoust pdaoust Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you want to do more work, or create multiple terminals to work in, you'll need to re-enter the `nix develop` shell in each new instance. The packages are cached locally on your machine, so they will be ready the next time you enter the shell. If you follow the practices above to create a per-project `flake.nix` file, you can work completely offline, but you need an internet connection in order to enter the [ad-hoc shell](#holonix%27s-usage-of-nix%27s-flakes-features). If you're going to be working offline, you can [download a snapshot of the holochain GitHub repository](https://github.com/holochain/holochain/archive/refs/heads/develop.zip) and enter the shell once using the contained `flake.nix`. After that, the packages will be cached and you can continue to use this flake for ad-hoc shells.
If you want to do more work, or create multiple terminals to work in, you'll need to re-enter the `nix develop` shell in each new instance. The packages are cached locally on your machine, so they will be ready the next time you enter the shell. If you follow the practices above to create a per-project `flake.nix` file, you can work completely offline, but you need an internet connection in order to enter the [ad-hoc shell](#holonix%27s-usage-of-nix%27s-flakes-features). If you're going to be working offline, you can copy the following code into a `flake.nix` file, then enter the shell using `nix run flake.nix#holonix` once before you go offline. The packages will all be cached, and you can use the same command to enter an ad-hoc shell while you are offline.
```nix
inputs = {
holochain-flake = {
url = "github:holochain/holochain";
};
};

just a wild guess that this would work ☝🏼 testing my understanding by writing code for review!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, doesn't work. The files are cached and you can enter a per-project nix develop shell while offline (albeit with a few spurious errors), but that skeleton didn't do anything productive.


Each Holochain application repository will contain its own setup of the development environment.
If you use the scaffolding to generate the project structure, this will already be taken care of in the scaffolded directory.

If you want to learn more about how this setup works and how to create it manually and how to maintain it, please find all the information below.

### Holonix's usage of [Nix's Flakes](https://nixos.wiki/wiki/Flakes) features
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Holonix's usage of [Nix's Flakes](https://nixos.wiki/wiki/Flakes) features
### Holonix's usage of [Nix Flakes](https://nixos.wiki/wiki/Flakes) features


The flake follows (think inherits) the `nixpkgs` input of the `holochain-flake` input. This ensures that your development environment passes all the same buildinputs to the component packages, giving you very high chances to make use of our Cachix binary cache.
This flake declares one input named `holochain-flake` that the Holochain Github repository. This input will look for a `flake.nix` in the default branch of the remote repository. The `versions` input of the `holochain-flake` input is explicitly specified to track the _0_1_ series, which refers to Holochain's Beta 0.1 and its compatible tools.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This flake declares one input named `holochain-flake` that the Holochain Github repository. This input will look for a `flake.nix` in the default branch of the remote repository. The `versions` input of the `holochain-flake` input is explicitly specified to track the _0_1_ series, which refers to Holochain's Beta 0.1 and its compatible tools.
This flake declares one input named `holochain-flake` that represents the Holochain Github repository. This input will look for a `flake.nix` in the default branch of the remote repository. The `versions` input of the `holochain-flake` input is explicitly specified to track the _0_1_ series, which refers to Holochain's Beta 0.1 and its compatible tools.

The flake follows (think inherits) the `nixpkgs` input of the `holochain-flake` input. This ensures that your development environment passes all the same buildinputs to the component packages, giving you very high chances to make use of our Cachix binary cache.
This flake declares one input named `holochain-flake` that the Holochain Github repository. This input will look for a `flake.nix` in the default branch of the remote repository. The `versions` input of the `holochain-flake` input is explicitly specified to track the _0_1_ series, which refers to Holochain's Beta 0.1 and its compatible tools.

The flake follows (think _inherits_) the `nixpkgs` input of the `holochain-flake` input. This ensures that your development environment passes all the same buildinputs to the component packages, giving you very high chances to make use of our Cachix binary cache.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The flake follows (think _inherits_) the `nixpkgs` input of the `holochain-flake` input. This ensures that your development environment passes all the same buildinputs to the component packages, giving you very high chances to make use of our Cachix binary cache.
The flake follows (think _inherits_) the `nixpkgs` input of the `holochain-flake` input. This ensures that your development environment passes all the same build inputs to the component packages, giving you very high chances to make use of our Cachix binary cache.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it's one word, even though a compound one 🤔 maybe build-inputs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In plain English it's not one word. If you want to use syntax, then put it in "quotes" or in back ticks.

Base automatically changed from quick-setup/introduce-setup-script to main March 8, 2023 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants