mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Check requiredSystemFeatures for local builds
For example, this prevents a "kvm" build on machines that don't have KVM. Fixes #2012.
This commit is contained in:
parent
7ae7a38c9a
commit
1e7b8deea7
8 changed files with 79 additions and 16 deletions
|
@ -757,6 +757,33 @@ password <replaceable>my-password</replaceable>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry xml:id="conf-system-features"><term><literal>system-features</literal></term>
|
||||
|
||||
<listitem><para>A set of system “features” supported by this
|
||||
machine, e.g. <literal>kvm</literal>. Derivations can express a
|
||||
dependency on such features through the derivation attribute
|
||||
<varname>requiredSystemFeatures</varname>. For example, the
|
||||
attribute
|
||||
|
||||
<programlisting>
|
||||
requiredSystemFeatures = [ "kvm" ];
|
||||
</programlisting>
|
||||
|
||||
ensures that the derivation can only be built on a machine with
|
||||
the <literal>kvm</literal> feature.</para>
|
||||
|
||||
<para>This setting by default includes <literal>kvm</literal> if
|
||||
<filename>/dev/kvm</filename> is accessible, and the
|
||||
pseudo-features <literal>nixos-test</literal>,
|
||||
<literal>benchmark</literal> and <literal>big-parallel</literal>
|
||||
that are used in Nixpkgs to route builds to specific
|
||||
machines.</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry xml:id="conf-timeout"><term><literal>timeout</literal></term>
|
||||
|
||||
<listitem>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</partintro>
|
||||
-->
|
||||
|
||||
<xi:include href="rl-2.2.xml" />
|
||||
<xi:include href="rl-2.1.xml" />
|
||||
<xi:include href="rl-2.0.xml" />
|
||||
<xi:include href="rl-1.11.10.xml" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue