numtide / flake-utils

Pure Nix flake utility functions [maintainer=@zimbatm]
MIT License
1.15k stars 79 forks source link

eachSystem: special case hydraJobs to match hydra convention. #45

Closed jbgi closed 2 years ago

jbgi commented 2 years ago

hydraJobs attribute is expected to be of the form

hydraJobs."<attr>"."<system>" = derivation;

(https://nixos.wiki/wiki/Flakes)

Ma27 commented 2 years ago

I don't really like this change. Let's say you have e.g. hydraJobs.tests.foo (see e.g. https://github.com/NixOS/nix/blob/master/flake.nix) or hydraJobs.haskellPackages.bar then it'll result in hydraJobs.tests.x86_64-linux.foo when using eachSystem which seems quite wrong to me.

So unless we'll revert this, we should try to push system down as far as possible (e.g. until lib.isDerivation is true).

WDYT @jbgi @zimbatm? Unless you'd like to implement this, I'd be happy to file a PR on my own during the next days :)

zimbatm commented 2 years ago

Sounds good. Otherwise I'll just revert this change.

Ma27 commented 2 years ago

Preparing a patch :)