mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Docs: Explain why import nixpkgs works in flakes
This commit is contained in:
parent
56dc6ed841
commit
605c8f7789
2 changed files with 10 additions and 3 deletions
|
|
@ -254,9 +254,14 @@ static RegisterPrimOp primop_import({
|
|||
.args = {"path"},
|
||||
// TODO turn "normal path values" into link below
|
||||
.doc = R"(
|
||||
Load, parse and return the Nix expression in the file *path*. If
|
||||
*path* is a directory, the file ` default.nix ` in that directory
|
||||
is loaded. Evaluation aborts if the file doesn’t exist or contains
|
||||
Load, parse and return the Nix expression in the file *path*.
|
||||
|
||||
The value *path* is conveted to a string as described in `builtins.toString`.
|
||||
|
||||
If *path* is a directory, the file ` default.nix ` in that directory
|
||||
is loaded.
|
||||
|
||||
Evaluation aborts if the file doesn’t exist or contains
|
||||
an incorrect Nix expression. `import` implements Nix’s module
|
||||
system: you can put any Nix expression (such as a set or a
|
||||
function) in a separate file, and use it from Nix expressions in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue