Skip to content

Allow derivations in meta #2532

@Ekleog

Description

@Ekleog

It looks like nix refuses to have derivations in meta for some operations (eg. exporting as JSON):

bool DrvInfo::checkMeta(Value & v)

This has caused NixOS/nixpkgs#50230, after the change in NixOS/nixpkgs#44439.

Currently, the solution appears to be to use passthru.tests instead of meta.tests, which is a possibility but appears semantically wrong.

Would it be possible to make Nix able to have derivations in meta? I think a legitimate display value for these would be the result of instantiating the derivation, without building it.

Alternatively, I think checkMeta should be called at each build, so that it's not possible to miss it like we did :)

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions