modules: refactor plugins code in top-level

This commit is contained in:
Gaetan Lepage 2025-03-31 23:47:06 +02:00
parent d81f37256d
commit efb24d78bd
7 changed files with 221 additions and 122 deletions

View file

@ -0,0 +1,17 @@
/*
Byte compiling of normalized plugin list
Inputs: List of normalized plugins
Outputs: List of normalized (compiled) plugins
*/
{ lib, pkgs }:
let
builders = lib.nixvim.builders.withPkgs pkgs;
byteCompile =
p:
(builders.byteCompileLuaDrv p).overrideAttrs (
prev: lib.optionalAttrs (prev ? dependencies) { dependencies = map byteCompile prev.dependencies; }
);
in
map (p: p // { plugin = byteCompile p.plugin; })