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
4d383f57
Commit
4d383f57
authored
12 years ago
by
Eelco Dolstra
Browse files
Options
Downloads
Patches
Plain Diff
Document "nix-build --run-env"
parent
4f7bab7d
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/nix-build.xml
+50
-1
50 additions, 1 deletion
doc/manual/nix-build.xml
with
50 additions
and
1 deletion
doc/manual/nix-build.xml
+
50
−
1
View file @
4d383f57
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</group>
</group>
<replaceable>
attrPath
</replaceable>
<replaceable>
attrPath
</replaceable>
</arg>
</arg>
<arg><option>
--drv-link
</option><replaceable>
drvlink
</replaceable></arg>
<arg><option>
--drv-link
</option>
<replaceable>
drvlink
</replaceable></arg>
<arg><option>
--add-drv-link
</option></arg>
<arg><option>
--add-drv-link
</option></arg>
<arg><option>
--no-out-link
</option></arg>
<arg><option>
--no-out-link
</option></arg>
<arg>
<arg>
...
@@ -38,6 +38,11 @@
...
@@ -38,6 +38,11 @@
</group>
</group>
<replaceable>
outlink
</replaceable>
<replaceable>
outlink
</replaceable>
</arg>
</arg>
<arg>
<option>
--run-env
</option>
<arg><option>
--command
</option>
<replaceable>
cmd
</replaceable></arg>
<arg><option>
--exclude
</option>
<replaceable>
regexp
</replaceable></arg>
</arg>
<arg
choice=
'plain'
rep=
'repeat'
><replaceable>
paths
</replaceable></arg>
<arg
choice=
'plain'
rep=
'repeat'
><replaceable>
paths
</replaceable></arg>
</cmdsynopsis>
</cmdsynopsis>
</refsynopsisdiv>
</refsynopsisdiv>
...
@@ -70,6 +75,13 @@ a root of the Nix garbage collector. This root disappears
...
@@ -70,6 +75,13 @@ a root of the Nix garbage collector. This root disappears
automatically when the
<filename>
result
</filename>
symlink is deleted
automatically when the
<filename>
result
</filename>
symlink is deleted
or renamed. So don’t rename the symlink.
</para></warning>
or renamed. So don’t rename the symlink.
</para></warning>
<para>
The subcommand
<command>
nix-build --run-env
</command>
will build
the dependencies of the derivation, but not the derivation itself. It
will then start an interactive shell in which all environment
variables defined by the derivation have been set to their
corresponding values. This is useful for reproducing the environment
of a derivation for development.
</para>
</refsection>
</refsection>
...
@@ -126,6 +138,28 @@ also <xref linkend="sec-common-options" />.</phrase></para>
...
@@ -126,6 +138,28 @@ also <xref linkend="sec-common-options" />.</phrase></para>
<xi:include
href=
"opt-common.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(//db:variablelist[@xml:id='opt-common']/*)"
/>
<xi:include
href=
"opt-common.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(//db:variablelist[@xml:id='opt-common']/*)"
/>
</variablelist>
</variablelist>
<para>
The following options apply to
<command>
nix-build --run-env
</command>
.
</para>
<variablelist>
<varlistentry><term><option>
--command
</option>
<replaceable>
cmd
</replaceable></term>
<listitem><para>
In the environment of the derivation, executeq the
command
<replaceable>
cmd
</replaceable>
instead of the default
interactive shell.
</para></listitem>
</varlistentry>
<varlistentry><term><option>
--exclude
</option>
<replaceable>
regexp
</replaceable></term>
<listitem><para>
Do not build any dependencies whose store path
matches the regular expression
<replaceable>
regexp
</replaceable>
.
This option may be specified multiple times.
</para></listitem>
</varlistentry>
</variablelist>
</refsection>
</refsection>
...
@@ -142,6 +176,21 @@ lrwxrwxrwx <replaceable>...</replaceable> result -> /nix/store/d18hyl92g30l...
...
@@ -142,6 +176,21 @@ lrwxrwxrwx <replaceable>...</replaceable> result -> /nix/store/d18hyl92g30l...
$ ls ./result/bin/
$ ls ./result/bin/
firefox firefox-config
</screen>
firefox firefox-config
</screen>
<para>
To build the dependencies of the package Pan, and start an
interactive shell in which to build it:
<screen>
$ nix-build '
<
nixpkgs>' --run-env -A pan
$ tar xf $src
$ cd pan-*
$ ./configure
$ make
$ ./pan/gui/pan
</screen>
</para>
</refsection>
</refsection>
...
...
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