Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix flake check is running checks for all systems in checks #6806

Closed
thiagokokada opened this issue Jul 14, 2022 · 2 comments
Closed

nix flake check is running checks for all systems in checks #6806

thiagokokada opened this issue Jul 14, 2022 · 2 comments
Labels

Comments

@thiagokokada
Copy link

thiagokokada commented Jul 14, 2022

Describe the bug

nix flake check is running eval(?)checks.<system>.<name> for all systems instead of just the current system as the documentation suggests:

Evaluation checks

    The following flake output attributes must be derivations:

      · checks.system.name
      · defaultPackage.system
      · devShell.system
      · devShells.system.name
      · nixosConfigurations.name.config.system.build.toplevel
      · packages.system.name

For example, adding checks.x86_64-darwin.hm-macos = self.outputs.homeConfigurations.hm-macos.activationPackage is sufficient to break nix flake check in x86_64-linux with the following error:

$ nix flake check
error: a 'x86_64-darwin' with features {} is required to build '/nix/store/md98zl0n4wggkl394x03kipglmyjls58-java-home.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, kvm, nixos-test}
(use '--show-trace' to show detailed location information)

Using --no-build flag makes no difference, so I think the issue here is the eval? I also tried to create a minimal repro flake.nix, but my attempts didn't work, so I am not sure what is happening here.

Steps To Reproduce

  1. My nix configs repo adding the checks for NixOS/Home-Manager/nix-darwin: [WIP] lib/flake: add checks thiagokokada/nix-configs#276
  2. nix flake check github:thiagokokada/nix-configs/add-checks

Expected behavior

nix flake check should only build and eval checks.<current system>.

nix-env --version output

nix-env (Nix) 2.8.1

Additional context

N/A

@thiagokokada
Copy link
Author

thiagokokada commented Jul 15, 2022

#4265

Looks like a duplicate of the bug above. Closing it.

@peterbecich
Copy link
Contributor

Working on this: #7759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants