Skip to content

Commit

Permalink
Update lookup-path.md
Browse files Browse the repository at this point in the history
Updated this entry with 2 sentence taken from the `nix.dev` tutorial's [lookup paths](https://nix.dev/tutorials/nix-language#lookup-paths) section as that resource makes it way easier to understand this concept.

Also added "_file system_" in front of "_path value_" because I found it an important clarification as "_path_" is an overloaded term.
  • Loading branch information
toraritte authored Aug 10, 2024
1 parent cfe66db commit cd3d55e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/manual/src/language/constructs/lookup-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
>
> *lookup-path* = `<` *identifier* [ `/` *identifier* ]... `>`
A lookup path is an identifier with an optional path suffix that resolves to a [path value](@docroot@/language/types.md#type-path) if the identifier matches a search path entry.
A lookup path is an identifier with an optional path suffix that resolves to a file system [path value](@docroot@/language/types.md#type-path) if the identifier matches a search path entry.

The value of a lookup path is determined by [`builtins.nixPath`](@docroot@/language/builtins.md#builtins-nixPath).

See [`builtins.findFile`](@docroot@/language/builtins.md#builtins-findFile) for details on lookup path resolution.

> **Example**
>
> Generally, `<nixpkgs>` points to the file system path of some revision of [Nixpkgs](https://nix.dev/reference/glossary#term-Nixpkgs).
>
> ```nix
> <nixpkgs>
>```
Expand All @@ -20,6 +22,8 @@ See [`builtins.findFile`](@docroot@/language/builtins.md#builtins-findFile) for
> **Example**
>
> `<nixpkgs/lib>` points to the subdirectory `nixos` of the file system path `<nixpkgs>` points to:
>
> ```nix
> <nixpkgs/nixos>
>```
Expand Down

0 comments on commit cd3d55e

Please sign in to comment.