nox icon indicating copy to clipboard operation
nox copied to clipboard

Respect meta.platforms and other attributes

Open zimbatm opened this issue 9 years ago • 1 comments

nox-review also tries to compile packages that obviously won't work, for example if the platform is not supported, if requireFile was used or if the package was marked as broken.

It would be nice if it would respect the same attributes as nix-env to avoid wasting time on incompatible stuff.

If you have any pointers I'm happy to try to fix this myself.

zimbatm avatar Mar 14 '16 16:03 zimbatm

Thanks for the issue! That would indeed be nice. The reason nox tries to compile those packages is because it has a fairly crude way to list the packages, as can bee seen here: https://github.com/madjar/nox/blob/master/nox/nixpkgs_repo.py#L80 . It mostly just calling nix-env -qaP drv-path.

Nox choose to rebuild a package just by list all packages before and after, and taking the difference(https://github.com/madjar/nox/blob/master/nox/review.py#L45).

If you can find a way to exclude packages that won't work (by adding a flag to the nix-env call, or by doing some extra filtering in the packaging function, without slowing it down too much), that should do the trick.

madjar avatar Mar 15 '16 07:03 madjar