This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

pkgs: try to filter platforms again

+6 -8
+6 -8
5pkgs/flake-module.nix
··· 5 5 { 6 6 packages = 7 7 let 8 - # Wrapper that handles platform-incompatible packages by catching eval errors. 9 - # This breaks laziness (evaluates all packages upfront) but ensures: 10 - # - Platform-incompatible packages are filtered out for `nix flake check` 11 - # - Real errors in package definitions are still caught and reported 12 - # 13 - # Note: tryEval catches both platform errors AND real errors. However, real errors 14 - # will still surface when the package is evaluated on platforms where dependencies exist. 8 + # Wrapper that handles platform-incompatible packages by: 9 + # 1. Catching eval errors during callPackage 10 + # 2. Filtering based on meta.platforms 15 11 platformAwareCallPackage = 16 12 path: args: 17 13 let 18 14 result = builtins.tryEval (pkgs.callPackage path args); 15 + pkg = result.value; 16 + isSupported = result.success && lib.meta.availableOn pkgs.stdenv.hostPlatform pkg; 19 17 in 20 - if result.success then result.value else null; 18 + if isSupported then pkg else null; 21 19 22 20 allPackages = lib.packagesFromDirectoryRecursive { 23 21 callPackage = platformAwareCallPackage;