From 074f14ecdb2d4742f443dbc74826ee68a9128a84 Mon Sep 17 00:00:00 2001 From: cold-briu Date: Mon, 25 Sep 2023 20:00:15 -0500 Subject: [PATCH] doc: fixed links and updated filenames --- book/src/SUMMARY.md | 6 +++--- book/src/contributing/adding-packages.md | 4 ++-- book/src/{contributing.md => contributing/index.md} | 0 .../contributing/internals/generating-manifests.md | 2 +- .../{internals.md => internals/index.md} | 12 ++++++------ .../contributing/internals/providing-milestones.md | 2 +- .../src/contributing/internals/providing-packages.md | 4 ++-- book/src/contributing/updating-packages.md | 2 +- book/src/nix-power-users/dev-shells.md | 2 +- book/src/nix-power-users/editor-plugins.md | 2 +- .../{nix-power-users.md => nix-power-users/index.md} | 0 book/src/nix-setup.md | 11 ++++++----- book/src/packages.md | 8 +++++--- 13 files changed, 29 insertions(+), 26 deletions(-) rename book/src/{contributing.md => contributing/index.md} (100%) rename book/src/contributing/{internals.md => internals/index.md} (72%) rename book/src/{nix-power-users.md => nix-power-users/index.md} (100%) diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 32632be3..b389c720 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -4,12 +4,12 @@ - [Quickstart](./quickstart.md) - [Nix Setup](./nix-setup.md) - [Packages](./packages.md) -- [Nix Power Users](./nix-power-users.md) +- [Nix Power Users](./nix-power-users/index.md) - [Dev Shells](./nix-power-users/dev-shells.md) - [Overlays](./nix-power-users/overlays.md) - [Editor Plugins](./nix-power-users/editor-plugins.md) -- [Contributing](./contributing.md) - - [Internals](./contributing/internals.md) +- [Contributing](./contributing/index.md) + - [Internals](./contributing/internals/index.md) - [Generating Manifests](./contributing/internals/generating-manifests.md) - [Providing Packages](./contributing/internals/providing-packages.md) - [Providing Milestones](./contributing/internals/providing-milestones.md) diff --git a/book/src/contributing/adding-packages.md b/book/src/contributing/adding-packages.md index 5fe4ba8e..a80140b3 100644 --- a/book/src/contributing/adding-packages.md +++ b/book/src/contributing/adding-packages.md @@ -73,7 +73,7 @@ We can do so by adding a condition to the list of filters: ``` See the [Filtering -Manifests](./internals/providing-packages.html#filtering-manifests) section for +Manifests](./internals/providing-packages.md#filtering-manifests) section for more details. ## Updating `./patches.nix` @@ -95,7 +95,7 @@ unique attributes, environment variables, etc: ``` For more details on how to apply manifest patches, see the -[Patching Manifests](./internals/providing-packages.html#patching-manifests) +[Patching Manifests](./internals/providing-packages.md#patching-manifests) section. > **Tip:** Check the new package's upstream CI to get an idea of what system diff --git a/book/src/contributing.md b/book/src/contributing/index.md similarity index 100% rename from book/src/contributing.md rename to book/src/contributing/index.md diff --git a/book/src/contributing/internals/generating-manifests.md b/book/src/contributing/internals/generating-manifests.md index 68fd4580..94c3de0b 100644 --- a/book/src/contributing/internals/generating-manifests.md +++ b/book/src/contributing/internals/generating-manifests.md @@ -51,7 +51,7 @@ to run. The script begins by declaring all FuelLabs repositories that we care about, followed by each unique package and which repository it is associated with. To declare new packages, see the -[Adding Packages](./contributing/adding-packages.html) chapter. +[Adding Packages](../adding-packages.md) chapter. The script aims to be idempotent, i.e. even if you were to delete the entire `./manifests` directory and all its manifests, running the script again should diff --git a/book/src/contributing/internals.md b/book/src/contributing/internals/index.md similarity index 72% rename from book/src/contributing/internals.md rename to book/src/contributing/internals/index.md index 7801b0bb..9899916e 100644 --- a/book/src/contributing/internals.md +++ b/book/src/contributing/internals/index.md @@ -2,15 +2,15 @@ At a very high level, **fuel.nix** does the following: -1. [**Generate unique "manifests" for each version of each package**](./internals/generating-manifests.html) +1. [**Generate unique "manifests" for each version of each package**](./generating-manifests.md) every night at 00:00 UTC under the `./manifests` directory using a CI action that runs the `./scripts/refresh-manifests.sh` script. -2. [**Provide `package` flake outputs**](./internals/providing-packages.html) +2. [**Provide `package` flake outputs**](./providing-packages.md) (e.g. `forc-0-20-0`, `fuel-core-0-18-0-nightly-2023-04-29`) by collecting, filtering (`filters.nix`) and patching (`patches.nix`) all manifests. Also provide package **sets** for the latest semver releases and nightlies e.g. (`fuel-latest`, `fuel-nightly`). -3. [**Provide a special set of "milestone" packages**](./internals/providing-milestones.html) +3. [**Provide a special set of "milestone" packages**](./providing-milestones.md) (e.g. `forc-wallet-beta-2`) and package sets (e.g. `fuel-beta-3`) by finding packages that match the commits specified in `milestones.nix`. 4. **Provide `devShell`s** to assist working on the fuel repos by collecting all @@ -21,6 +21,6 @@ Click on the links above to dive into more details on each step. Alternatively, for a quick look at adding or updating packages: -- [**Adding Packages**](./adding-packages.html) -- [**Updating Packages**](./updating-packages.html) -- [**Updating Flake Inputs**](./updating-flake-inputs.html) +- [Adding Packages](../adding-packages.md) +- [Updating Packages](../updating-packages.md) +- [Updating Flake Inputs](../updating-flake-inputs.md) diff --git a/book/src/contributing/internals/providing-milestones.md b/book/src/contributing/internals/providing-milestones.md index 800f0efa..3a6baecf 100644 --- a/book/src/contributing/internals/providing-milestones.md +++ b/book/src/contributing/internals/providing-milestones.md @@ -24,7 +24,7 @@ Here's what the `beta-2` milestone looks like: }; ``` -While [providing packages](./providing-packages.html), milestones are used to +While [providing packages](./providing-packages.md), milestones are used to provide a unique output for each package along with a dedicated package set. E.g. the above `beta-2` milestone is used to provide `fuel-core-beta-2` and `forc-beta-2` package aliases, as well as the extra `fuel-beta-2` package set. diff --git a/book/src/contributing/internals/providing-packages.md b/book/src/contributing/internals/providing-packages.md index d2c3a48e..3b80d113 100644 --- a/book/src/contributing/internals/providing-packages.md +++ b/book/src/contributing/internals/providing-packages.md @@ -7,7 +7,7 @@ The way in which **fuel.nix** creates package outputs is as follows: 1. Load all manifests from the `./manifests/` directory (see [Generating - Manifests](./generating-manifests.html)). + Manifests](./generating-manifests.md)). 2. Filter out manifests for package versions that are known to be broken, or untested versions that are older than **fuel.nix** itself, by applying the list of conditions in `./filters.nix`. @@ -179,7 +179,7 @@ Most notably, we provide: - **`fuel-nightly`** - Provides the latest nightly version of every Fuel tool. Sets are also provided for each milestone, however this is covered in the -[Providing Milestones](./providing-milestones.html) chapter. +[Providing Milestones](./providing-milestones.md) chapter. ### Other Packages diff --git a/book/src/contributing/updating-packages.md b/book/src/contributing/updating-packages.md index a9a8c7e6..02ebcb69 100644 --- a/book/src/contributing/updating-packages.md +++ b/book/src/contributing/updating-packages.md @@ -8,5 +8,5 @@ versions, we can make the necessary changes for new versions by adding a new patch to `./patches.nix`. See the [Patching -Manifests](./internals/providing-packages.html#patching-manifests) section for +Manifests](./internals/providing-packages.md#patching-manifests) section for details. diff --git a/book/src/nix-power-users/dev-shells.md b/book/src/nix-power-users/dev-shells.md index 834f4c25..c3624162 100644 --- a/book/src/nix-power-users/dev-shells.md +++ b/book/src/nix-power-users/dev-shells.md @@ -27,7 +27,7 @@ nix develop github:fuellabs/fuel.nix#forc-lsp ``` Currently the vim plugin still needs to be installed separately. See -[the Overlays chapter](./overlays.html) and the [Nix Vim wiki](https://nixos.wiki/wiki/Vim) +[the Overlays chapter](./overlays.md) and the [Nix Vim wiki](https://nixos.wiki/wiki/Vim) for more details. > **Note:** While these `devShell`s might be useful to get started on developing diff --git a/book/src/nix-power-users/editor-plugins.md b/book/src/nix-power-users/editor-plugins.md index 37cd8706..f175231c 100644 --- a/book/src/nix-power-users/editor-plugins.md +++ b/book/src/nix-power-users/editor-plugins.md @@ -1,6 +1,6 @@ # Editor Plugins -Currently this flake and [its overlay](./overlays.html) only provide the +Currently this flake and [its overlay](./overlays.md) only provide the `sway-vim` Vim plugin. Contributions adding support for other editors/IDE plugins are more than diff --git a/book/src/nix-power-users.md b/book/src/nix-power-users/index.md similarity index 100% rename from book/src/nix-power-users.md rename to book/src/nix-power-users/index.md diff --git a/book/src/nix-setup.md b/book/src/nix-setup.md index 0badc034..bb5f50fc 100644 --- a/book/src/nix-setup.md +++ b/book/src/nix-setup.md @@ -1,6 +1,6 @@ # Nix Setup -[**Nix**](https://nixos.org/) is a package manager with a focus on +**[Nix]** is a package manager with a focus on reproducibility and reliability. Fuel Labs leverages Nix to provide a simple way to natively install the ecosystem tooling along with any necessary system dependencies and environment setup. @@ -11,17 +11,17 @@ uninstall Nix and its installed packages if necessary. ## Install Nix -To recap our [Quickstart](./quickstart.html), we can install Nix with the +To recap our [Quickstart](./quickstart.md), we can install Nix with the following command: ```console curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/tag/v0.9.0 | sh -s -- install --extra-conf "extra-substituters = https://fuellabs.cachix.org" --extra-conf "extra-trusted-public-keys = fuellabs.cachix.org-1:3gOmll82VDbT7EggylzOVJ6dr0jgPVU/KMN6+Kf8qx8=" ``` -This uses the [`nix-installer` tool by Determinate Systems](nix-installer) to -install Nix with the [**flakes**](nix-flakes) and [**nix-command**](nix-command) +This uses the [`nix-installer` tool by Determinate Systems][nix-installer] to +install Nix with the [**flakes**][nix-flakes] and [**nix-command**][nix-command] features enabled, and provides `--extra-conf` flags that enable [the Fuel Labs -binary cache](fuel-labs-cache). +binary cache][fuel-labs-cache]. > **Note:** Without a binary cache, Nix will build everything from source on > first use. This can take a long time! The fuel.nix repo CI builds all channels @@ -100,6 +100,7 @@ packages with the following: /nix/nix-installer uninstall ``` +[Nix]: https://nixos.org/ [fuel-labs-cache]: https://app.cachix.org/cache/fuellabs [nix-flakes]: https://nixos.wiki/wiki/Flakes [nix-command]: https://nixos.wiki/wiki/Nix_command diff --git a/book/src/packages.md b/book/src/packages.md index cc7bcd3c..a4a125b3 100644 --- a/book/src/packages.md +++ b/book/src/packages.md @@ -40,7 +40,7 @@ Similarly, run the version of a package from a milestone with `-`, e. nix run github:fuellabs/fuel.nix#forc-lsp-beta-3 ``` ``` -nix run github:fuellabs/fuel.nix#forc-wallet-beta-1 +nix run github:fuellabs/fuel.nix#forc-wallet-beta-4 ``` ## Temporary Shells @@ -112,11 +112,11 @@ nix profile remove 3 where `3` is the index of the package when running `nix profile list`. For more options around managing nix user profiles, see [the -docs](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-profile.html). +docs][nix-docs]. > **NOTE:** If a previous version of Nix was installed on the system, the > `nix profile` command may not work due to an old symlink being present in $HOME. -> See [**this issue**](https://github.com/DeterminateSystems/nix-installer/issues/477). +> See [**this issue**][nix-profile-issue]. > If you encounter this issue, you can remedy it by deleting the `~/.nix-profile` > symlink so that the `nix profile` commands can recreate it with the correct > path. @@ -141,3 +141,5 @@ nix run github:fuellabs/fuel.nix#forc-fmt-0-24-3-nightly-2022-09-14 [fuel-indexer-repo]: https://github.com/fuellabs/fuel-indexer [sway-repo]: https://github.com/fuellabs/sway [sway-vim-repo]: https://github.com/fuellabs/sway.vim +[nix-docs]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-profile.html +[nix-profile-issue]: https://github.com/DeterminateSystems/nix-installer/issues/477