From c7dbbdc0b5600a8dcca3754a0589e545f99788ed Mon Sep 17 00:00:00 2001 From: Dan Carley Date: Thu, 15 May 2025 10:02:57 +0100 Subject: [PATCH 1/5] concepts: Update manifest.lock example The previous contents were a v0 pkgdb lock which is no longer in use or supported. I've extracted a small subset of relevant fields from a current lockfile that installs NodeJS. --- docs/concepts/environments.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/docs/concepts/environments.md b/docs/concepts/environments.md index 1819044..ac5e5b2 100644 --- a/docs/concepts/environments.md +++ b/docs/concepts/environments.md @@ -74,23 +74,18 @@ were built and activated at a particular point in time. ``` json title="manifest.lock" { - "lockfile-version": 0, - ... - "input": { - "attrs": { - "lastModified": 1703581207, - "narHash": "3ef...", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3ef...", - "type": "github" - }, - "fingerprint": "3ef...", - "url": "github:NixOS/nixpkgs/3ef..." - }, - "priority": 5 + … + "packages": [ + { + "install_id": "nodejs", + "version": "24.0.1", + "system": "aarch64-darwin", + "outputs": { + "dev": "/nix/store/by9av8x8vmk8lpw4cxhhxfbf7s1h4xzx-nodejs-24.0.1-dev", + "libv8": "/nix/store/li49fpxxlgzaz20sahhfj6n8cbkqi7m1-nodejs-24.0.1-libv8", + "out": "/nix/store/naafq480zhq05xbi2d3kzpnna2rdqsfb-nodejs-24.0.1" }, - "nodejs": { + … } ``` From f4a5b0c3ae218796a89a72f18da2b33afebc89b3 Mon Sep 17 00:00:00 2001 From: Dan Carley Date: Thu, 15 May 2025 10:04:50 +0100 Subject: [PATCH 2/5] tutorials: Remove unused links. --- docs/tutorials/customizing-environments.md | 1 - docs/tutorials/multi-arch-environments.md | 3 --- 2 files changed, 4 deletions(-) diff --git a/docs/tutorials/customizing-environments.md b/docs/tutorials/customizing-environments.md index 71215e4..7c27a56 100644 --- a/docs/tutorials/customizing-environments.md +++ b/docs/tutorials/customizing-environments.md @@ -147,6 +147,5 @@ Success. You can now start the database server using: [flox_activate]: ../reference/command-reference/flox-activate.md [create_enviornments_guide]: ./creating-environments.md [multi-arch-guide]: ./multi-arch-environments.md -[manifest_concept]: ../concepts/manifest.md [environment_concept]: ../concepts/environments.md [hook_concept]: ../concepts/manifest.md#hook-section diff --git a/docs/tutorials/multi-arch-environments.md b/docs/tutorials/multi-arch-environments.md index 23a0c9c..8d187af 100644 --- a/docs/tutorials/multi-arch-environments.md +++ b/docs/tutorials/multi-arch-environments.md @@ -137,10 +137,7 @@ get the `systemd` package. - :simple-readme:{ .flox-purple .flox-heart } [Environment concept][environment_concept] [environment_concept]: ../concepts/environments.md -[install_concept]: ../concepts/manifest.md#install-section [sharing_guide]: ./sharing-environments.md -[manifest_toml]: ../concepts/manifest.md -[environment_concept]: ../concepts/environments.md [flox_search]: ../reference/command-reference/flox-search.md [flox_show]: ../reference/command-reference/flox-show.md [flox_edit]: ../reference/command-reference/flox-edit.md From d9945f29b4c68f805e658a6c52f9841ee0d0d369 Mon Sep 17 00:00:00 2001 From: Dan Carley Date: Thu, 15 May 2025 10:05:19 +0100 Subject: [PATCH 3/5] Link to manifest.toml sections Instead of the duplicate and potentially out-of-date content in the manfiest concepts which will be removed in a subsequent commit. --- docs/concepts/activation.md | 6 +++--- docs/tutorials/customizing-environments.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/concepts/activation.md b/docs/concepts/activation.md index 4e1a7f6..9e8307b 100644 --- a/docs/concepts/activation.md +++ b/docs/concepts/activation.md @@ -325,6 +325,6 @@ that prepare your environment just how you like them. [environment-concept]: ./services.md [bash-func-export]: https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.html#index-export -[vars-section]: ../concepts/manifest.md#vars-section -[hook-section]: ../concepts/manifest.md#hook-section -[profile-section]: ../concepts/manifest.md#profile-section +[vars-section]: ../reference/command-reference/manifest.toml.md#vars +[hook-section]: ../reference/command-reference/manifest.toml.md#hook +[profile-section]: ../reference/command-reference/manifest.toml.md#profile diff --git a/docs/tutorials/customizing-environments.md b/docs/tutorials/customizing-environments.md index 7c27a56..925a387 100644 --- a/docs/tutorials/customizing-environments.md +++ b/docs/tutorials/customizing-environments.md @@ -148,4 +148,4 @@ Success. You can now start the database server using: [create_enviornments_guide]: ./creating-environments.md [multi-arch-guide]: ./multi-arch-environments.md [environment_concept]: ../concepts/environments.md -[hook_concept]: ../concepts/manifest.md#hook-section +[hook_concept]: ../reference/command-reference/manifest.toml.md#hook From 82af58ab1665797aef052cf7c8380bbcd0af9d05 Mon Sep 17 00:00:00 2001 From: Dan Carley Date: Thu, 15 May 2025 10:16:09 +0100 Subject: [PATCH 4/5] concepts: Rename environment heading anchors In preperation for linking and redirect to them. The previous versions were quite wordy when rendered above the sections, in the side navbar, and as anchors like `#environment-manifest-floxenvmanifesttoml`. Technically this will break existing links in the wild but I can't see anywhere that we currently reference the anchors ourselves. --- docs/concepts/environments.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/concepts/environments.md b/docs/concepts/environments.md index ac5e5b2..ab1d463 100644 --- a/docs/concepts/environments.md +++ b/docs/concepts/environments.md @@ -52,7 +52,7 @@ file in a `.flox` directory wherever the [`flox init`][flox_init] command was run. Let's look closer at the files that were generated. -### Environment manifest: `.flox/env/manifest.toml` +### `manifest.toml` The manifest is a declarative specification for the environment and contains 5 parts: @@ -67,7 +67,7 @@ parts: [customizing environments guide][customizing_environments_guide] to walk through examples. -### Manifest lock: `.flox/env/manifest.lock` +### `manifest.lock` The lock file serves as a snapshot of the specific versions of dependencies that were built and activated at a particular point in time. @@ -89,7 +89,7 @@ were built and activated at a particular point in time. } ``` -### Environment metadata: `.flox/env.json` +### `env.json` A metadata file that contains the name of the environment and the environment's version. Flox manages this file for you. From 20cafbd9c6e2191a832996bc5803dd8d6bbd7ef9 Mon Sep 17 00:00:00 2001 From: Dan Carley Date: Thu, 15 May 2025 10:06:31 +0100 Subject: [PATCH 5/5] concepts: Merge manifest concept into environments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `/concepts/manifest` page had content that overlapped with both: - `manifest.toml` which contains a more complete listing of all the currently supported sections. - `environments` which describes the files stored in `.flox/env/` So merge it with environments, introduce the basic format and how to edit, then link out to `manifest.toml` for more details. The old URL will be redirected using the functionality that was added in 91141a7. It's worth noting that this doesn't return a 301 response because the redirect is performed client-side from static content: % http :8000/docs/concepts/manifest/ HTTP/1.0 200 OK Content-Length: 1280 Content-Type: text/html Date: Thu, 15 May 2025 09:35:46 GMT Server: WSGIServer/0.2 CPython/3.11.9 Redirecting... You're being redirected to a new destination.