From a150798ce48d457290dc00b7fe1b6a766ed4cc58 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Nov 2024 13:05:37 +0100 Subject: [PATCH] Document "final" semantics --- src/nix/flake.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nix/flake.md b/src/nix/flake.md index 2b999431c..b3321441c 100644 --- a/src/nix/flake.md +++ b/src/nix/flake.md @@ -666,6 +666,11 @@ following fields: other attributes are necessary because they provide information not stored in the store path. + The attributes in `locked` are considered "final", meaning that they are the only ones that are passed via the arguments of the `outputs` function of a flake. + For instance, if `locked` contains a `lastModified` attribute while the fetcher does not return a `lastModified` attribute, then the `lastModified` attribute will be passed to the `outputs` function. + Conversely, if `locked` does *not* contain a `lastModified` attribute while the fetcher *does* return a `lastModified` attribute, then no `lastModified` attribute will be passed. + If `locked` contains a `lastModifed` attribute and the fetcher returns a `lastModified` attribute, then they must have the same value. + * `flake`: A Boolean denoting whether this is a flake or non-flake dependency. Corresponds to the `flake` attribute in the `inputs` attribute in `flake.nix`.