Skip to content

Automatically add apple virtualization to system-features #7619

@roberth

Description

@roberth

Is your feature request related to a problem? Please describe.

MacOS has two virtualization frameworks. By introducing these feature labels we allow for machines without such support to join a build farm.

Describe the solution you'd like

Add system-features = nixos-test to the default/example configuration and add "hvf" and "avf" dynamically based on whether these technologies are available, similar to how we do it for "kvm".

Describe alternatives you've considered

Additional context

Most MacOS systems support virtualization, but this is not a given.

AVF: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_virtualization

nix/src/libstore/globals.cc

Lines 126 to 143 in fb8fc6f

StringSet Settings::getDefaultSystemFeatures()
{
/* For backwards compatibility, accept some "features" that are
used in Nixpkgs to route builds to certain machines but don't
actually require anything special on the machines. */
StringSet features{"nixos-test", "benchmark", "big-parallel"};
#if __linux__
features.insert("uid-range");
#endif
#if __linux__
if (access("/dev/kvm", R_OK | W_OK) == 0)
features.insert("kvm");
#endif
return features;
}

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposalmacosNix on macOS, aka OS X, aka darwin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions