mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
64 lines
1.5 KiB
Nix
64 lines
1.5 KiB
Nix
{
|
|
description = "Neovim derivation";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
|
gen-luarc = {
|
|
url = "github:mrcjkb/nix-gen-luarc-json";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
self,
|
|
nixpkgs,
|
|
flake-utils,
|
|
gen-luarc,
|
|
...
|
|
}: let
|
|
supportedSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
neovim-overlay = import ./nix/neovim-overlay.nix {inherit inputs;};
|
|
in
|
|
flake-utils.lib.eachSystem supportedSystems (system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
neovim-overlay
|
|
inputs.neovim-nightly-overlay.overlays.default
|
|
gen-luarc.overlays.default
|
|
];
|
|
};
|
|
shell = pkgs.mkShell {
|
|
name = "nvim-devShell";
|
|
buildInputs = with pkgs; [
|
|
lua-language-server
|
|
nil
|
|
stylua
|
|
luajitPackages.luacheck
|
|
];
|
|
shellHook = ''
|
|
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 = neovim-overlay;
|
|
};
|
|
}
|