top-level/packages-info: add pname fallback

A recent change broke the repology updater, because it relies on pname
and version fields. We can fallback to *some* values temporarily, but
the right fix is to make sure pname is available on all packages in
Nixpkgs. That effort is ongoing, once it is complete, we should remove
the fallbacks.
This commit is contained in:
Wolfgang Walther
2026-01-15 11:16:06 +01:00
parent 0761246dc9
commit e19bb692c2
+5 -2
View File
@@ -25,9 +25,12 @@ let
value = null;
}) value.outputs
);
${if value ? "pname" then "pname" else null} = value.pname;
${if value ? "system" then "system" else null} = value.system;
${if value ? "version" then "version" else null} = value.version;
# TODO: Remove the following two fallbacks when all packages have been fixed.
# Note: pname and version are *required* by repology, so do not change to
# the optional pattern from above.
pname = value.pname or value.name;
version = value.version or "";
};
}
]