mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
modules/nixpkgs: don't set args.lib
`lib.evalModules` always includes `lib`, `config`, `options`, &
(configured) `specialArgs` in the (final) `specialArgs`[1].
Therefore, setting `_module.args.lib` has no effect.
[1]: 329d232802/lib/modules.nix (L233)
This commit is contained in:
parent
11df0d6c9e
commit
87f50db84d
1 changed files with 8 additions and 16 deletions
|
@ -1,24 +1,16 @@
|
|||
{
|
||||
defaultPkgs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ defaultPkgs, lib, ... }:
|
||||
let
|
||||
# TODO: https://github.com/nix-community/nixvim/issues/1784
|
||||
finalPackage = defaultPkgs;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
_module.args = {
|
||||
# We explicitly set the default override priority, so that we do not need
|
||||
# to evaluate finalPkgs in case an override is placed on `_module.args.pkgs`.
|
||||
# After all, to determine a definition priority, we need to evaluate `._type`,
|
||||
# which is somewhat costly for Nixpkgs. With an explicit priority, we only
|
||||
# evaluate the wrapper to find out that the priority is lower, and then we
|
||||
# don't need to evaluate `finalPkgs`.
|
||||
pkgs = lib.mkOverride lib.modules.defaultOverridePriority finalPackage;
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
_module.args.pkgs = lib.mkOverride lib.modules.defaultOverridePriority finalPackage;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue