-
Notifications
You must be signed in to change notification settings - Fork 79
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
introduce filterSystem #27
Comments
My solution but with nixpkgs lib: filterPackages = system: packages:
let
# Everything that nix flake check requires for the packages output
filter = (n: v: with v; let platforms = meta.hydraPlatforms or meta.platforms or [ ]; in
lib.isDerivation v && !meta.broken && builtins.elem system platforms);
in
lib.filterAttrs filter packages; |
If it wouldn't be too much work to adapt @Pacman99's example to a version without a dependancy on nixpkgs, I think filtering would be a sane way to allow users to start experimenting with the newer Obviously I guess the question is still: what's the benefit of All that is too say, if we don't try to solve this dilemma soon in a compelling way, then flakes may end up being a huge waste and users will just always rely on the crutch that is Although, it is possible that package filtering would be better handled by some magic in |
When I wrote So for now, I would suggest ignoring the naming and use |
Implemented by #28 |
As an alternative to
flattenTreeSystem
, I proposefilterSystem
that directly acts on the output of currentflattenTree
and filters with a predicate that drops all packages that would trivially fail anix flake check
./cc @Pacman99 @nrdxp
The text was updated successfully, but these errors were encountered: