mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 00:45:17 -06:00
fix full-deps
This commit is contained in:
parent
6e5ab46a79
commit
0c5b3d23ae
2 changed files with 17 additions and 14 deletions
29
flake.nix
29
flake.nix
|
|
@ -6,6 +6,18 @@
|
|||
};
|
||||
outputs = inputs @ {self, nixpkgs, flake-utils, ...}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
recursiveMerge = attrList: let
|
||||
f = attrPath:
|
||||
builtins.zipAttrsWith (n: values:
|
||||
if pkgs.lib.tail values == []
|
||||
then pkgs.lib.head values
|
||||
else if pkgs.lib.all pkgs.lib.isList values
|
||||
then pkgs.lib.unique (pkgs.lib.concatLists values)
|
||||
else if pkgs.lib.all pkgs.lib.isAttrs values
|
||||
then f (attrPath ++ [n]) values
|
||||
else pkgs.lib.last values);
|
||||
in
|
||||
f [] attrList;
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
|
|
@ -23,28 +35,17 @@
|
|||
ripgrep
|
||||
];
|
||||
full-dependancies = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
] ++ dependancies;
|
||||
];
|
||||
neovim-with-deps = recursiveMerge [
|
||||
pkgs.neovim-unwrapped
|
||||
{ buildInputs = dependancies; }
|
||||
];
|
||||
neovim-with-full-deps = recursiveMerge [
|
||||
pkgs.neovim-unwrapped
|
||||
{ buildInputs = dependancies; }
|
||||
{ buildInputs = dependancies ++ full-dependancies; }
|
||||
];
|
||||
recursiveMerge = attrList: let
|
||||
f = attrPath:
|
||||
builtins.zipAttrsWith (n: values:
|
||||
if pkgs.lib.tail values == []
|
||||
then pkgs.lib.head values
|
||||
else if pkgs.lib.all pkgs.lib.isList values
|
||||
then pkgs.lib.unique (pkgs.lib.concatLists values)
|
||||
else if pkgs.lib.all pkgs.lib.isAttrs values
|
||||
then f (attrPath ++ [n]) values
|
||||
else pkgs.lib.last values);
|
||||
in
|
||||
f [] attrList;
|
||||
in rec {
|
||||
packages.full = pkgs.wrapNeovim neovim-with-full-deps (base // {
|
||||
configure = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue