Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packageDefinitions.packagename = {}:{ extra } and toLua implementation improvements #63

Merged
merged 21 commits into from
Nov 15, 2024

Conversation

BirdeeHub
Copy link
Owner

@BirdeeHub BirdeeHub commented Nov 15, 2024

having everyone put all the values in categories and use the category fetcher for values is probably confusing.

It still works the same way, I just added an optional extra set to packageDefinitions named extra.

categoryDefinitions = { pkgs, settings, categories, extra, name, ... }@pkgDef: {
};
packageDefinitions = {
  packagename = { pkgs, ... }: {
    settings = {};
    categories = {};
    extra = {};
  };
};

Like the other tables, you can use nixCats.extra("path.to.val") as an alias for fetching with vim.tbl_get to protect against nil table access errors, which is different from how the main nixCats('path.to.cat') works in that, if it does not find the value, it will always return nil, rather than returning an indicator of whether it was enabled or not. You can also use :NixCats extra to view the table

utils.mkLuaInline has been renamed to utils.n2l.types.inline-safe.mk

Extra utils.n2l functions added documented at :help nixCats.flake.outputs.utils.n2l

@BirdeeHub BirdeeHub merged commit 3714989 into main Nov 15, 2024
@BirdeeHub BirdeeHub deleted the n2l branch November 15, 2024 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant