mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Document path values in inputs
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
9223d64ac6
commit
75cda2da7f
1 changed files with 7 additions and 0 deletions
|
@ -212,6 +212,13 @@ Currently the `type` attribute can be one of the following:
|
||||||
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.
|
||||||
|
|
||||||
|
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`
|
||||||
|
2. escaping URL characters (refer to IETF RFC?)
|
||||||
|
3. prepending `path:`
|
||||||
|
|
||||||
|
Note that the allowed syntax for path values in flake `inputs` may be more restrictive than general Nix, so you may need to use `path:` if your path contains certain special characters. See [Path literals](@docroot@/language/syntax#path-literal)
|
||||||
|
|
||||||
Note that if you omit `path:`, relative paths must start with `.` to
|
Note that if you omit `path:`, relative paths must start with `.` to
|
||||||
avoid ambiguity with registry lookups (e.g. `nixpkgs` is a registry
|
avoid ambiguity with registry lookups (e.g. `nixpkgs` is a registry
|
||||||
lookup; `./nixpkgs` is a relative path).
|
lookup; `./nixpkgs` is a relative path).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue