This commit is contained in:
iofq 2023-05-11 04:20:45 -05:00
commit 4c341f6650
3 changed files with 120 additions and 0 deletions

61
flake.lock generated Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1683717387,
"narHash": "sha256-b4GSeKtDH+7wzw9VptHqIWOyIq28j7++rvRqhCEWFQ8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1e8ab5db89c84b1bb29d8d10ea60766bb5cee1f2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

58
flake.nix Normal file
View file

@ -0,0 +1,58 @@
{
description = "...";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
};
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 {
deps = with pkgs; [
fzf
];
neovim-with-deps = recursiveMerge [
pkgs.neovim-unwrapped
{buildInputs = deps;}
];
packages.iofqvim = pkgs.wrapNeovim neovim-with-deps {
viAlias = true;
vimAlias = true;
extraMakeWrapperArgs = ''--prefix PATH : "${pkgs.lib.makeBinPath deps}"'';
configure = {
plugins = with pkgs.vimPlugins; {
plugs = with pkgs.vimPlugins; [
telescope-nvim
];
};
};
};
apps.iofqvim = flake-utils.lib.mkApp {
drv = packages.iofqvim;
name = "iofqvim";
exePath = "/bin/nvim";
};
apps.default = apps.iofqvim;
packages.default = packages.iofqvim;
});
}

1
result Symbolic link
View file

@ -0,0 +1 @@
/nix/store/vwg8csg6j9swzam3pwa6r391dpzqmmcd-neovim-0.9.0