diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-22 19:21:26 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-22 19:21:26 +0000 |
commit | ea2acbed493e218f696673a004a95829392c5e33 (patch) | |
tree | c5716552f205bbf4d4addfa4675ea5073786bd06 /nixpkgs/lib/fileset/README.md | |
parent | 06ba6c84f858b011fb1132721e5d5e28fcda4a8a (diff) | |
parent | 8aa8cd68f4745eb92f003666bfd300f3e67cd9c1 (diff) | |
download | nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.gz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.bz2 nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.lz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.xz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.zst nixlib-ea2acbed493e218f696673a004a95829392c5e33.zip |
Merge branch 'staging' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/lib/fileset/README.md')
-rw-r--r-- | nixpkgs/lib/fileset/README.md | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/nixpkgs/lib/fileset/README.md b/nixpkgs/lib/fileset/README.md index dbb591a4c8c8..6e57f1f8f2b4 100644 --- a/nixpkgs/lib/fileset/README.md +++ b/nixpkgs/lib/fileset/README.md @@ -41,13 +41,21 @@ An attribute set with these values: - `_type` (constant string `"fileset"`): Tag to indicate this value is a file set. -- `_internalVersion` (constant string equal to the current version): - Version of the representation +- `_internalVersion` (constant `2`, the current version): + Version of the representation. - `_internalBase` (path): Any files outside of this path cannot influence the set of files. This is always a directory. +- `_internalBaseRoot` (path): + The filesystem root of `_internalBase`, same as `(lib.path.splitRoot _internalBase).root`. + This is here because this needs to be computed anyway, and this computation shouldn't be duplicated. + +- `_internalBaseComponents` (list of strings): + The path components of `_internalBase`, same as `lib.path.subpath.components (lib.path.splitRoot _internalBase).subpath`. + This is here because this needs to be computed anyway, and this computation shouldn't be duplicated. + - `_internalTree` ([filesetTree](#filesettree)): A tree representation of all included files under `_internalBase`. @@ -59,8 +67,8 @@ An attribute set with these values: One of the following: - `{ <name> = filesetTree; }`: - A directory with a nested `filesetTree` value for every directory entry. - Even entries that aren't included are present as `null` because it improves laziness and allows using this as a sort of `builtins.readDir` cache. + A directory with a nested `filesetTree` value for directory entries. + Entries not included may either be omitted or set to `null`, as necessary to improve efficiency or laziness. - `"directory"`: A directory with all its files included recursively, allowing early cutoff for some operations. @@ -169,15 +177,9 @@ Arguments: ## To update in the future Here's a list of places in the library that need to be updated in the future: -- > The file set library is currently very limited but is being expanded to include more functions over time. +- > The file set library is currently somewhat limited but is being expanded to include more functions over time. in [the manual](../../doc/functions/fileset.section.md) -- > Currently the only way to construct file sets is using implicit coercion from paths. - - in [the `toSource` reference](./default.nix) -- > For now filesets are always paths - - in [the `toSource` implementation](./default.nix), also update the variable name there - Once a tracing function exists, `__noEval` in [internal.nix](./internal.nix) should mention it - If/Once a function to convert `lib.sources` values into file sets exists, the `_coerce` and `toSource` functions should be updated to mention that function in the error when such a value is passed - If/Once a function exists that can optionally include a path depending on whether it exists, the error message for the path not existing in `_coerce` should mention the new function |