mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
document all special system features and their behavior
This commit is contained in:
parent
493ddf617f
commit
5f37ebcf83
3 changed files with 41 additions and 24 deletions
|
@ -345,3 +345,15 @@ Derivations can declare some infrequently used optional attributes.
|
|||
This is useful, for example, when generating self-contained filesystem images with
|
||||
their own embedded Nix store: hashes found inside such an image refer
|
||||
to the embedded store and not to the host's Nix store.
|
||||
|
||||
- [`requiredSystemFeatures`]{#adv-attr-requiredSystemFeatures}\
|
||||
|
||||
If a derivation has the `requiredSystemFeatures` attribute, then Nix will only build it on a machine that has the corresponding features set in its [`system-features` configuration](@docroot@/command-ref/conf-file.md#conf-system-features).
|
||||
|
||||
For example, setting
|
||||
|
||||
```nix
|
||||
requiredSystemFeatures = [ "kvm" ];
|
||||
```
|
||||
|
||||
ensures that the derivation can only be built on a machine with the `kvm` feature.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue