mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +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 =
|
config =
|
||||||
let
|
let
|
||||||
# Optionally byte compile lua library
|
# 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 =
|
extraLuaPackages =
|
||||||
if config.performance.byteCompileLua.enable && config.performance.byteCompileLua.luaLib then
|
if config.performance.byteCompileLua.enable && config.performance.byteCompileLua.luaLib then
|
||||||
ps: byteCompileLuaPackages (config.extraLuaPackages ps)
|
ps: byteCompileLuaPackages (config.extraLuaPackages ps)
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
# Utilities for byte compiling of lua dependencies
|
# Utilities for byte compiling of lua dependencies
|
||||||
{ lib, pkgs }:
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
neovim-unwrapped,
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
builders = lib.nixvim.builders.withPkgs pkgs;
|
builders = lib.nixvim.builders.withPkgs pkgs;
|
||||||
inherit (import ./utils.nix lib) mapNormalizedPlugins;
|
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,
|
# Applies a function to the derivation, but only if it's a lua module,
|
||||||
# otherwise returns it as is
|
# otherwise returns it as is
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
callPackage,
|
||||||
pathsToLink,
|
pathsToLink,
|
||||||
standalonePlugins,
|
standalonePlugins,
|
||||||
}:
|
}:
|
||||||
|
@ -9,7 +9,7 @@ let
|
||||||
getAndNormalizeDeps
|
getAndNormalizeDeps
|
||||||
removeDeps
|
removeDeps
|
||||||
;
|
;
|
||||||
mkPluginPack = import ./mk-plugin-pack.nix { inherit lib pkgs; };
|
mkPluginPack = callPackage ./mk-plugin-pack.nix { inherit lib; };
|
||||||
|
|
||||||
in
|
in
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -32,14 +32,14 @@ in
|
||||||
build.plugins =
|
build.plugins =
|
||||||
let
|
let
|
||||||
shouldCompilePlugins = byteCompileCfg.enable && byteCompileCfg.plugins;
|
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;
|
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;
|
shouldCombinePlugins = config.performance.combinePlugins.enable;
|
||||||
combinePlugins = import ./combine-plugins.nix {
|
combinePlugins = pkgs.callPackage ./combine-plugins.nix {
|
||||||
inherit lib pkgs;
|
inherit lib;
|
||||||
inherit (config.performance.combinePlugins)
|
inherit (config.performance.combinePlugins)
|
||||||
standalonePlugins
|
standalonePlugins
|
||||||
pathsToLink
|
pathsToLink
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{ lib, pkgs }:
|
{
|
||||||
|
lib,
|
||||||
|
buildEnv,
|
||||||
|
vimUtils,
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (import ./utils.nix lib) normalizePlugin;
|
inherit (import ./utils.nix lib) normalizePlugin;
|
||||||
in
|
in
|
||||||
|
@ -8,7 +12,7 @@ let
|
||||||
overridePlugin =
|
overridePlugin =
|
||||||
plugin:
|
plugin:
|
||||||
plugin.plugin.overrideAttrs (prev: {
|
plugin.plugin.overrideAttrs (prev: {
|
||||||
nativeBuildInputs = lib.remove pkgs.vimUtils.vimGenDocHook prev.nativeBuildInputs or [ ];
|
nativeBuildInputs = lib.remove vimUtils.vimGenDocHook prev.nativeBuildInputs or [ ];
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
${prev.configurePhase or ""}
|
${prev.configurePhase or ""}
|
||||||
rm -vf doc/tags'';
|
rm -vf doc/tags'';
|
||||||
|
@ -56,8 +60,8 @@ let
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
[
|
[
|
||||||
pkgs.buildEnv
|
buildEnv
|
||||||
pkgs.vimUtils.toVimPlugin
|
vimUtils.toVimPlugin
|
||||||
(drv: drv.overrideAttrs { inherit propagatedBuildInputs; })
|
(drv: drv.overrideAttrs { inherit propagatedBuildInputs; })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue