Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nora Puchreiner
Nix
Commits
d8730fb8
Commit
d8730fb8
authored
5 years ago
by
Ersin Akinci
Browse files
Options
Downloads
Patches
Plain Diff
Document import <path> syntax
parent
ab4dd1d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/manual/expressions/builtins.xml
+9
-1
9 additions, 1 deletion
doc/manual/expressions/builtins.xml
with
9 additions
and
1 deletion
doc/manual/expressions/builtins.xml
+
9
−
1
View file @
d8730fb8
...
...
@@ -733,13 +733,21 @@ builtins.genList (x: x * x) 5
<varlistentry
xml:id=
'builtin-import'
>
<term><function>
import
</function>
<replaceable>
path
</replaceable></term>
<term><function>
import
</function>
<replaceable>
<
path
>
</replaceable></term>
<term><function>
builtins.import
</function>
<replaceable>
path
</replaceable></term>
<term><function>
builtins.import
</function>
<replaceable>
<
path
>
</replaceable></term>
<listitem><para>
Load, parse and return the Nix expression in the
file
<replaceable>
path
</replaceable>
. If
<replaceable>
path
</replaceable>
is a directory, the file
<filename>
default.nix
</filename>
in that directory is loaded. Evaluation aborts if the
</filename>
in that directory is loaded. If the
<replaceable>
<
path
>
</replaceable>
syntax is used, the path will be resolved
relative to those listed in the
<envar>
NIX_PATH
</envar>
environment
variable (see the section on
<envar
linkend=
"env-NIX_PATH"
>
NIX_PATH
</envar>
for details on how the resolution works). Evaluation aborts if the
file doesn’t exist or contains an incorrect Nix expression.
<function>
import
</function>
implements Nix’s module system: you
can put any Nix expression (such as a set or a function) in a
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment