nix-community.nixvim/modules/top-level/plugins/byte-compile-plugins.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
443 B
Nix
Raw Normal View History

/*
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; })