nix: fix plugins for the overlays
This commit is contained in:
parent
96df527d73
commit
d6a70d64ea
1 changed files with 49 additions and 53 deletions
38
flake.nix
38
flake.nix
|
@ -133,14 +133,6 @@
|
|||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, utils, ... }:
|
||||
{
|
||||
overlays = {
|
||||
default = final: prev: {
|
||||
myneovim = prev.callPackage ./. { };
|
||||
};
|
||||
};
|
||||
} //
|
||||
utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
inputPlugins = [
|
||||
"plenary-nvim"
|
||||
|
@ -171,30 +163,34 @@
|
|||
"theme"
|
||||
];
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(final: prev:
|
||||
mkNvimPlugins = { lib, vimUtils, vimPlugins, ... }:
|
||||
let
|
||||
inherit (prev.lib) listToAttrs nameValuePair;
|
||||
inherit (builtins) getAttr;
|
||||
inherit (lib) listToAttrs nameValuePair;
|
||||
|
||||
buildPlugin = name: prev.vimUtils.buildVimPluginFrom2Nix {
|
||||
buildPlugin = name: vimUtils.buildVimPluginFrom2Nix {
|
||||
name = name;
|
||||
src = builtins.getAttr name inputs;
|
||||
src = getAttr name inputs;
|
||||
};
|
||||
|
||||
buildPluginValuePair = n: nameValuePair n (buildPlugin n);
|
||||
|
||||
customPlugins = listToAttrs (builtins.map buildPluginValuePair inputPlugins);
|
||||
customPlugins = listToAttrs (map buildPluginValuePair inputPlugins);
|
||||
in
|
||||
{ vimPlugins = vimPlugins // customPlugins; };
|
||||
in
|
||||
{
|
||||
vimPlugins = prev.vimPlugins // customPlugins;
|
||||
}
|
||||
)
|
||||
];
|
||||
overlays = {
|
||||
default = final: prev: {
|
||||
myneovim = prev.callPackage ./. (mkNvimPlugins prev);
|
||||
};
|
||||
};
|
||||
} //
|
||||
utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
neovim = pkgs.callPackage ./. { };
|
||||
neovim = pkgs.callPackage ./. (mkNvimPlugins pkgs);
|
||||
in
|
||||
{
|
||||
apps.default = {
|
||||
|
|
Reference in a new issue