mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
modules: refactor plugins code in top-level
This commit is contained in:
parent
d81f37256d
commit
efb24d78bd
7 changed files with 221 additions and 122 deletions
17
modules/top-level/plugins/byte-compile-plugins.nix
Normal file
17
modules/top-level/plugins/byte-compile-plugins.nix
Normal 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; })
|
Loading…
Add table
Add a link
Reference in a new issue