1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Example of referencing parent directories

This commit is contained in:
Eelco Dolstra 2025-01-07 14:01:49 +01:00
parent 0792152627
commit ef2739b7c9

View file

@ -210,7 +210,9 @@ Currently the `type` attribute can be one of the following:
the directory containing that `flake.nix`. However, the resolved the directory containing that `flake.nix`. However, the resolved
path must be in the same tree. For instance, a `flake.nix` in the path must be in the same tree. For instance, a `flake.nix` in the
root of a tree can use `path:./foo` to access the flake in root of a tree can use `path:./foo` to access the flake in
subdirectory `foo`, but `path:../bar` is illegal. subdirectory `foo`, but `path:../bar` is illegal. On the other
hand, a flake in the `/foo` directory of a tree can use
`path:../bar` to refer to the flake in `/bar`.
Path inputs can be specified with path values in `flake.nix`. Path values are a syntax for `path` inputs, and they are converted by Path inputs can be specified with path values in `flake.nix`. Path values are a syntax for `path` inputs, and they are converted by
1. resolving them into relative paths, relative to the base directory of `flake.nix` 1. resolving them into relative paths, relative to the base directory of `flake.nix`