Skip to content

Commit

Permalink
More fixing overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
wiltaylor committed Jan 26, 2022
1 parent c1ef9c5 commit 5944d01
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
34 changes: 14 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,21 @@
"nvim-which-key"
];

externalBitsOverlay = lib.mkOverlays {
inherit allPkgs;
overlayFunc = sys: pkgs: (top: last: {
rnix-lsp = rnix-lsp.defaultPackage.${sys};
neovim-nightly = neovim.defaultPackage.${sys};
});
externalBitsOverlay = top: last: {
rnix-lsp = rnix-lsp.defaultPackage.${top.system};
neovim-nightly = neovim.defaultPackage.${top.system};
};

pluginOverlay = lib.mkOverlays {
inherit allPkgs;
overlayFunc = sys: pkgs: (top: last: let
buildPlug = name: top.vimUtils.buildVimPluginFrom2Nix {
pname = name;
version = "master";
src = builtins.getAttr name inputs;
};
in {
neovimPlugins = builtins.listToAttrs (map (name: { inherit name; value = buildPlug name; }) plugins);
});
pluginOverlay = top: last: let
buildPlug = name: top.vimUtils.buildVimPluginFrom2Nix {
pname = name;
version = "master";
src = builtins.getAttr name inputs;
};
in {
neovimPlugins = builtins.listToAttrs (map (name: { inherit name; value = buildPlug name; }) plugins);
};

allPkgs = lib.mkPkgs {
inherit nixpkgs;
cfg = { allowUnfree = true; };
Expand Down Expand Up @@ -164,8 +158,8 @@
defaultPackage = lib.withDefaultSystems (sys: self.packages."${sys}".neovimWT);

overlay = top: last: {
neovimWT = lib.neovimBuilder top;
neovimPlugins = pkgs.neovimPlugins;
neovimWT = lib.neovimBuilder last;
neovimPlugins = last.neovimPlugins;
};

packages = lib.withDefaultSystems (sys: {
Expand Down
2 changes: 1 addition & 1 deletion lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ rec {
import nixpkgs {
system = sys;
config = cfg;
overlays = map (m: m."${sys}") overlays;
overlays = overlays;
});

withDefaultSystems = withSystems defaultSystems;
Expand Down

0 comments on commit 5944d01

Please sign in to comment.