From 799273bf13dfbd3c108f1b8659b78e970cfe6f43 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 11 Feb 2025 20:47:52 +0100 Subject: [PATCH] ci/eval/compare: Ignore null packages CI can fail to evaluate if a package is null: https://github.com/NixOS/nixpkgs/actions/runs/13209876145/job/36881335314?pr=380228 --- ci/eval/compare/maintainers.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/eval/compare/maintainers.nix b/ci/eval/compare/maintainers.nix index 64025c066f965..69748a629cffd 100644 --- a/ci/eval/compare/maintainers.nix +++ b/ci/eval/compare/maintainers.nix @@ -24,8 +24,11 @@ let pkg: if (lib.attrsets.hasAttrByPath pkg.path pkgs) then ( - if (builtins.tryEval (lib.attrsets.attrByPath pkg.path null pkgs)).success then - true + let + value = lib.attrsets.attrByPath pkg.path null pkgs; + in + if (builtins.tryEval value).success then + if value != null then true else builtins.trace "${pkg.name} exists but is null" false else builtins.trace "Failed to access ${pkg.name} even though it exists" false )