Skip to content

Commit

Permalink
More ui metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Sep 18, 2024
1 parent 5b76e36 commit f3c2795
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
11 changes: 9 additions & 2 deletions nix/makeEnvironment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,18 @@ symlinkJoin {
uiMetadata = callPackage ./uiMetadata.nix {};
in
{
# channels = lib.mapAttrsToList uiMetadata.mkChannelUiMetadata channels;
# channels = lib.mapAttrsToList (name: channel: channel // {
# name = name;
# }) channels;
channels = [];

kernels = map uiMetadata.mkKernelUiMetadata (attrValues builtKernels);

# other_packages = map uiMetadata.mkOtherPackageUiMetadata otherPackages;
other_packages = map (package: {
channel = "foo";
attr = "bar";
meta = if package ? "meta" then uiMetadata.chooseInterestingMeta package else {};
}) evaluated.config.packages;
};

ui_metadata_yaml = writeText "ui-metadata.yaml" (lib.generators.toYAML {} ui_metadata);
Expand Down
10 changes: 0 additions & 10 deletions nix/uiMetadata.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ rec {
language_server_names = contents.languageServerNames;
});

mkChannelUiMetadata = name: channel: channel // {
name = name;
};

# This is duplicated from languages/common.nix, which we'd rather not import here
packageName = p: if lib.isString p then p else p.name;

Expand All @@ -65,10 +61,4 @@ rec {
modes = kernel.modes;
meta = chooseInterestingMeta kernel;
};

mkOtherPackageUiMetadata = package: {
channel = package.channel;
attr = package.attr;
meta = if package.contents ? "meta" then chooseInterestingMeta package.contents else {};
};
}

0 comments on commit f3c2795

Please sign in to comment.