Skip to content

Commit

Permalink
Finish putting kernel stuff in meta
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Mar 7, 2024
1 parent 7f8f3a1 commit b1fe9fb
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions codedown/uiMetadata.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ rec {
}) // (lib.optionalAttrs (contents ? "meta") (
lib.filterAttrs (n: v:
n == "description"
|| n == "displayName"
|| n == "icon"

|| n == "homepage"
|| n == "downloadPage"
|| n == "changelog"

|| (n == "available" && !v)
Expand All @@ -24,9 +22,13 @@ rec {
)
contents.meta
)) // (lib.optionalAttrs (lib.hasAttrByPath ["meta" "license" "spdxId"] contents) {
spdxId = contents.meta.license.spdxId;
spdx_id = contents.meta.license.spdxId;
}) // (lib.optionalAttrs (lib.hasAttrByPath ["meta" "downloadPage"] contents) {
download_page = contents.meta.downloadPage;
}) // (lib.optionalAttrs (lib.hasAttrByPath ["meta" "displayName"] contents) {
display_name = contents.meta.displayName;
}) // (lib.optionalAttrs (contents ? "settingsSchema") {
inherit (contents) settingsSchema;
settings_schema = contents.settingsSchema;
}) // (lib.optionalAttrs (contents ? "modes") {
inherit (contents) modes;
});
Expand All @@ -52,14 +54,7 @@ rec {
packages = map (p: mkKernelPackageMetadata kernel p) kernel.args.packages;

# Hydrated
display_name = if kernel.meta ? "displayName" then kernel.meta.displayName else null;
icon = if kernel.meta ? "icon" then kernel.meta.icon else null;
modes = kernel.modes;
settings_schema = if kernel ? "settingsSchema" then kernel.settingsSchema else {};
meta = chooseInterestingMeta kernel;

# TODO?
languageServerNames = [];
};

mkOtherPackageUiMetadata = package: {
Expand Down

0 comments on commit b1fe9fb

Please sign in to comment.