Skip to content

Allow nix realisation info to return partial results #12128

Open
@PkmX

Description

Is your feature request related to a problem?

We have a large number (~2K) of CA derivations, and our tool use nix realisation to mass check whether those derivations have been realised on the remote store.

However, nix realisation info will bail if any of the derivation is not realised on the remote store:

these 5 derivations will be built:
  /nix/store/<...>.drv
  /nix/store/<...>.drv
  /nix/store/<...>.drv
  /nix/store/<...>.drv
  /nix/store/<...>.drv
error: cannot operate on output 'out' of the unbuilt derivation '/nix/store/<...>.drv'

Proposed solution

Add an option --ignore-non-realised (name subject to change) to ignore the error and still output other realisations.

Alternative solutions

Run nix realisation info on each input derivation separately. This works but is really slow since there is a ton of duplicated work.

Additional context

Checklist


Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    ca-derivationsDerivations with content addressed outputsfeatureFeature request or proposalnew-cliRelating to the "nix" command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions