Skip to content

use of meta.tests causes evaluation errors #50230

Closed

Description

@peti

#44439 adds meta.tests to dovecot, but that attribute is not supported by Nix and causes evaluation errors, i.e.:

$ nix-env -qaP --meta --json  >/dev/null
derivation 'dovecot-2.3.3' has invalid meta attribute 'tests'
derivation 'opensmtpd-6.4.0p1' has invalid meta attribute 'tests'

This output breaks several scripts of mine (for updating the Haskell package set) and I would kindly request to make those warnings disappear one way or another.

Ping: @Ekleog, @timokau

Activity

  1. added
    0.kind: regression
    on Nov 11, 2018
  2. timokau commented on Nov 11, 2018

    @timokau
    Member

    This is weird since @Ekleog did add the tests attribute to metaTypes in pkgs/stdenv/generic/check-meta.nix.

  3. grahamc commented on Nov 11, 2018

    @grahamc
    Member

    My guess is a derivations' meta can't contain derivations, but I'm not sure. I think this may be true because it raises this question: when evaluating and querying meta fields about a package (which is possible,) should the derivations be built or not? Yes, for consistency it should, but running a bunch of tests when querying packages doesn't make sense.

  4. Ekleog commented on Nov 11, 2018

    @Ekleog
    Member

    @timokau It appears to be also checked a second time in nix itself for some (but not all) operations: https://github.com/NixOS/nix/blob/f6a3dfe4e06980b2d060fd1a646cb5ca20f29779/src/nix-env/nix-env.cc#L872

    This means either we need to change nix, or we need to use passthru. I'm opening an issue on nix for more thought on this.

  5. grahamc commented on Nov 11, 2018

    @grahamc
    Member

    Probably should just use passthru.

  6. Ekleog commented on Nov 11, 2018

    @Ekleog
    Member

    OK, I'll include the switch to passthru in the refactoring I'm doing to address the cross-building issues.

  7. Ekleog commented on Nov 11, 2018

    @Ekleog
    Member

    This should be fixed in #50233

  8. timokau commented on Nov 11, 2018

    @timokau
    Member

    Checking this in nix itself seems out of place to me, but using patthru is probably the best quick fix.

  9. Ekleog commented on Nov 11, 2018

    @Ekleog
    Member

    Feel free to react to NixOS/nix#2532, which I opened as the issue seen from the nix point of view :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: regression

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions