mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
modules/top-level: change usages of import to callPackage
This commit is contained in:
parent
4c23fb2738
commit
49a7bb573a
5 changed files with 23 additions and 13 deletions
|
@ -172,7 +172,9 @@ in
|
|||
config =
|
||||
let
|
||||
# Optionally byte compile lua library
|
||||
inherit (import ./plugins/byte-compile-lua-lib.nix { inherit lib pkgs; }) byteCompileLuaPackages;
|
||||
inherit (pkgs.callPackage ./plugins/byte-compile-lua-lib.nix { inherit lib; })
|
||||
byteCompileLuaPackages
|
||||
;
|
||||
extraLuaPackages =
|
||||
if config.performance.byteCompileLua.enable && config.performance.byteCompileLua.luaLib then
|
||||
ps: byteCompileLuaPackages (config.extraLuaPackages ps)
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
# Utilities for byte compiling of lua dependencies
|
||||
{ lib, pkgs }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
neovim-unwrapped,
|
||||
}:
|
||||
let
|
||||
builders = lib.nixvim.builders.withPkgs pkgs;
|
||||
inherit (import ./utils.nix lib) mapNormalizedPlugins;
|
||||
|
||||
luaPackages = pkgs.neovim-unwrapped.lua.pkgs;
|
||||
luaPackages = neovim-unwrapped.lua.pkgs;
|
||||
|
||||
# Applies a function to the derivation, but only if it's a lua module,
|
||||
# otherwise returns it as is
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
callPackage,
|
||||
pathsToLink,
|
||||
standalonePlugins,
|
||||
}:
|
||||
|
@ -9,7 +9,7 @@ let
|
|||
getAndNormalizeDeps
|
||||
removeDeps
|
||||
;
|
||||
mkPluginPack = import ./mk-plugin-pack.nix { inherit lib pkgs; };
|
||||
mkPluginPack = callPackage ./mk-plugin-pack.nix { inherit lib; };
|
||||
|
||||
in
|
||||
/*
|
||||
|
|
|
@ -32,14 +32,14 @@ in
|
|||
build.plugins =
|
||||
let
|
||||
shouldCompilePlugins = byteCompileCfg.enable && byteCompileCfg.plugins;
|
||||
byteCompilePlugins = import ./byte-compile-plugins.nix { inherit lib pkgs; };
|
||||
byteCompilePlugins = pkgs.callPackage ./byte-compile-plugins.nix { inherit lib; };
|
||||
|
||||
shouldCompileLuaLib = byteCompileCfg.enable && byteCompileCfg.luaLib;
|
||||
inherit (import ./byte-compile-lua-lib.nix { inherit lib pkgs; }) byteCompilePluginDeps;
|
||||
inherit (pkgs.callPackage ./byte-compile-lua-lib.nix { inherit lib; }) byteCompilePluginDeps;
|
||||
|
||||
shouldCombinePlugins = config.performance.combinePlugins.enable;
|
||||
combinePlugins = import ./combine-plugins.nix {
|
||||
inherit lib pkgs;
|
||||
combinePlugins = pkgs.callPackage ./combine-plugins.nix {
|
||||
inherit lib;
|
||||
inherit (config.performance.combinePlugins)
|
||||
standalonePlugins
|
||||
pathsToLink
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{ lib, pkgs }:
|
||||
{
|
||||
lib,
|
||||
buildEnv,
|
||||
vimUtils,
|
||||
}:
|
||||
let
|
||||
inherit (import ./utils.nix lib) normalizePlugin;
|
||||
in
|
||||
|
@ -8,7 +12,7 @@ let
|
|||
overridePlugin =
|
||||
plugin:
|
||||
plugin.plugin.overrideAttrs (prev: {
|
||||
nativeBuildInputs = lib.remove pkgs.vimUtils.vimGenDocHook prev.nativeBuildInputs or [ ];
|
||||
nativeBuildInputs = lib.remove vimUtils.vimGenDocHook prev.nativeBuildInputs or [ ];
|
||||
configurePhase = ''
|
||||
${prev.configurePhase or ""}
|
||||
rm -vf doc/tags'';
|
||||
|
@ -56,8 +60,8 @@ let
|
|||
};
|
||||
}
|
||||
[
|
||||
pkgs.buildEnv
|
||||
pkgs.vimUtils.toVimPlugin
|
||||
buildEnv
|
||||
vimUtils.toVimPlugin
|
||||
(drv: drv.overrideAttrs { inherit propagatedBuildInputs; })
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue