This repository has no description
0

Configure Feed

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

pkgs: filter pkgs based on platform

+21 -6
+16 -4
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. 15 + platformAwareCallPackage = 16 + path: args: 17 + let 18 + result = builtins.tryEval (pkgs.callPackage path args); 19 + in 20 + if result.success then result.value else null; 21 + 8 22 allPackages = lib.packagesFromDirectoryRecursive { 9 - inherit (pkgs) callPackage; 23 + callPackage = platformAwareCallPackage; 10 24 directory = ./.; 11 25 }; 12 26 in 13 - lib.filterAttrs ( 14 - name: pkg: name != "flake-module" && lib.meta.availableOn pkgs.stdenv.hostPlatform pkg 15 - ) allPackages; 27 + lib.filterAttrs (name: pkg: name != "flake-module" && pkg != null) allPackages; 16 28 }; 17 29 }
+5 -2
5pkgs/nm-dmenu/package.nix
··· 1 1 { pkgs, lib, ... }: 2 2 3 - pkgs.writers.writeDashBin "nm-dmenu" '' 3 + (pkgs.writers.writeDashBin "nm-dmenu" '' 4 4 export PATH=$PATH:${ 5 5 lib.makeBinPath [ 6 6 (pkgs.writers.writeDashBin "dmenu" '' ··· 11 11 ] 12 12 } 13 13 exec ${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu "$@" 14 - '' 14 + '') 15 + // { 16 + meta.platforms = lib.platforms.linux; 17 + }