lib/*-plugin: use lib.mkPackageOption internally

Instead of maintainers providing an actual `defaultPackage`, they should
specify the pkg name which we'll use when calling `lib.mkPackageOption`.

This makes `mkVimPlugin` and `mkNeovimPlugin` compliant with #1950.
This commit is contained in:
Matt Sturgeon 2024-09-01 09:39:25 +01:00
parent c8bb7880bf
commit 285f6cbd7b
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
6 changed files with 150 additions and 109 deletions

View file

@ -1,15 +1,11 @@
{
lib,
pkgs,
...
}:
{ lib, ... }:
let
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.neovim-plugin.mkNeovimPlugin {
name = "my-plugin";
originalName = "my-plugin.nvim"; # TODO replace (or remove entirely if it is the same as `name`)
defaultPackage = pkgs.vimPlugins.my-plugin-nvim; # TODO replace
package = "my-plugin-nvim"; # TODO replace
maintainers = [ lib.maintainers.MyName ]; # TODO replace with your name