Add 'pkgs/nvim/' from commit 'e5a176d5b7'

git-subtree-dir: pkgs/nvim
git-subtree-mainline: 6fd74fbf0c7a66496ea6f99f85f6045b822f1f4f
git-subtree-split: e5a176d5b7
This commit is contained in:
iofq 2026-02-26 22:15:47 -06:00
commit c544159576
23 changed files with 2085 additions and 0 deletions

76
pkgs/nvim/flake.nix Normal file
View file

@ -0,0 +1,76 @@
{
description = "Neovim derivation";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils";
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
gen-luarc = {
url = "github:mrcjkb/nix-gen-luarc-json";
inputs.nixpkgs.follows = "nixpkgs";
};
dart = {
url = "github:iofq/dart.nvim";
};
jj-nvim = {
url = "github:NicolasGB/jj.nvim";
flake = false;
};
};
outputs =
inputs@{
nixpkgs,
flake-utils,
...
}:
let
systems = builtins.attrNames nixpkgs.legacyPackages;
# This is where the Neovim derivation is built.
neovim-overlay = import ./nix/neovim-overlay.nix { inherit inputs; };
finalOverlays = [
inputs.neovim-nightly-overlay.overlays.default
neovim-overlay
];
in
flake-utils.lib.eachSystem systems (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = finalOverlays ++ [
inputs.gen-luarc.overlays.default
];
};
shell = pkgs.mkShell {
name = "nvim-devShell";
buildInputs = with pkgs; [
lua-language-server
nixd
stylua
luajitPackages.luacheck
];
shellHook = ''
# symlink the .luarc.json generated in the overlay
ln -fs ${pkgs.nvim-luarc-json} .luarc.json
'';
};
in
{
packages = rec {
default = nvim;
nvim = pkgs.nvim-pkg;
nvim-min = pkgs.nvim-min-pkg;
};
devShells = {
default = shell;
};
}
)
// {
overlays.default = nixpkgs.lib.composeManyExtensions finalOverlays;
};
}