nix-community.nixvim/update-scripts/default.nix
Matt Sturgeon b04aa8fb49 update-scripts: get nixpkgs using flak-compat
This ensures we get an actual nixpkgs flake, which will have source info
like `rev`.

It also means we have access to `nixvim` if we need it.

(cherry picked from commit bfee503e0f)
2025-06-03 09:46:14 +00:00

20 lines
726 B
Nix

{
# By default, load nixvim using flake-compat
nixvim ? import ../.,
pkgs ? nixvim.inputs.nixpkgs.legacyPackages.${builtins.currentSystem},
lib ? nixvim.inputs.nixpkgs.lib,
}:
lib.fix (self: {
# The main script
default = self.generate;
generate = lib.callPackageWith (pkgs // self) ./generate.nix { };
# A shell that has the generate script
shell = pkgs.mkShell { nativeBuildInputs = [ self.generate ]; };
# Derivations that build the generated files
efmls-configs-sources = pkgs.callPackage ./efmls-configs.nix { };
none-ls-builtins = pkgs.callPackage ./none-ls.nix { };
rust-analyzer-options = pkgs.callPackage ./rust-analyzer { };
lspconfig-servers = pkgs.callPackage ./nvim-lspconfig { };
})