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, ... }:
|
outputs = inputs @ { self, nixpkgs, utils, ... }:
|
||||||
{
|
|
||||||
overlays = {
|
|
||||||
default = final: prev: {
|
|
||||||
myneovim = prev.callPackage ./. { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} //
|
|
||||||
utils.lib.eachDefaultSystem (system:
|
|
||||||
let
|
let
|
||||||
inputPlugins = [
|
inputPlugins = [
|
||||||
"plenary-nvim"
|
"plenary-nvim"
|
||||||
|
@ -171,30 +163,34 @@
|
||||||
"theme"
|
"theme"
|
||||||
];
|
];
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
mkNvimPlugins = { lib, vimUtils, vimPlugins, ... }:
|
||||||
inherit system;
|
|
||||||
overlays = [
|
|
||||||
(final: prev:
|
|
||||||
let
|
let
|
||||||
inherit (prev.lib) listToAttrs nameValuePair;
|
inherit (builtins) getAttr;
|
||||||
|
inherit (lib) listToAttrs nameValuePair;
|
||||||
|
|
||||||
buildPlugin = name: prev.vimUtils.buildVimPluginFrom2Nix {
|
buildPlugin = name: vimUtils.buildVimPluginFrom2Nix {
|
||||||
name = name;
|
name = name;
|
||||||
src = builtins.getAttr name inputs;
|
src = getAttr name inputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildPluginValuePair = n: nameValuePair n (buildPlugin n);
|
buildPluginValuePair = n: nameValuePair n (buildPlugin n);
|
||||||
|
|
||||||
customPlugins = listToAttrs (builtins.map buildPluginValuePair inputPlugins);
|
customPlugins = listToAttrs (map buildPluginValuePair inputPlugins);
|
||||||
|
in
|
||||||
|
{ vimPlugins = vimPlugins // customPlugins; };
|
||||||
in
|
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
|
in
|
||||||
{
|
{
|
||||||
apps.default = {
|
apps.default = {
|
||||||
|
|
Reference in a new issue