Skip to content

Derivation/resource-specific max-jobs #12454

Open
@hacker1024

Description

Is your feature request related to a problem?

Some derivations use limited hardware resources, such as KVM in NixOS tests.

It would be great if there was a way to limit the max-jobs used for derivations that require these resources, so that conflicts can be avoided.

Proposed solution

An derivation attribute could be added, containing a list of "resource names" that a derivation requires. Then, in nix-conf, the maximum number of concurrent builds for derivations that need each resource can be defined.

Alternative solutions

max-jobs can be set globally while building such derivations, but this prevents their dependencies from building concurrently too, which isn't ideal.

Additional context

Checklist


Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions