From cb21713351c82bbb0a938cb63eb9414f906da038 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Sun, 14 May 2023 00:46:19 +0200 Subject: [PATCH] hydraJobs: filtering with meta plateform --- flake.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 05eda6c..516dc0f 100644 --- a/flake.nix +++ b/flake.nix @@ -132,12 +132,13 @@ (plat: { name = plat; value = - (builtins.listToAttrs (builtins.map - (e: { - name = e; - value = nixpkgs_plats.${plat}.callPackage (./packages + "/${e}") { }; - }) - (builtins.attrNames (builtins.readDir ./packages)))); + (lib.filterAttrs (name: value: (!lib.hasAttrByPath [ "meta" "platforms" ] value) || builtins.elem plat value.meta.platforms) + (builtins.listToAttrs (builtins.map + (e: { + name = e; + value = nixpkgs_plats.${plat}.callPackage (./packages + "/${e}") { }; + }) + (builtins.attrNames (builtins.readDir ./packages))))); }) machines_plats);