mirror of
https://github.com/numtide/flake-utils.git
synced 2024-11-26 10:34:00 +03:00
filterPackages: Add support for meta.badPlatforms
Since https://www.github.com/NixOS/nixpkgs/pull/37803 Nixpkgs supports using meta.badPlatforms to specify a list of platforms which are not supported by the package despite being included in meta.platforms. Modify filterPackages to honor these platform restrictions.
This commit is contained in:
parent
1ed9fb1935
commit
3ff4550a66
@ -22,10 +22,12 @@ let
|
||||
isDerivation = x: isAttrs x && x ? type && x.type == "derivation";
|
||||
isBroken = meta.broken or false;
|
||||
platforms = meta.hydraPlatforms or meta.platforms or allSystems;
|
||||
badPlatforms = meta.badPlatforms or [ ];
|
||||
in
|
||||
# check for isDerivation, so this is independently useful of
|
||||
# flattenTree, which also does filter on derviations
|
||||
isDerivation v && !isBroken && builtins.elem system platforms
|
||||
isDerivation v && !isBroken && (builtins.elem system platforms) &&
|
||||
!(builtins.elem system badPlatforms)
|
||||
;
|
||||
in
|
||||
filterAttrs sieve packages
|
||||
|
Loading…
Reference in New Issue
Block a user