From 119f12db27293d1642a5af8908207e151f8fef8a Mon Sep 17 00:00:00 2001 From: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Date: Sun, 7 Jul 2024 18:50:30 +0300 Subject: [PATCH] modules/output: avoid using global `with lib;` --- modules/top-level/output.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/top-level/output.nix b/modules/top-level/output.nix index bd62d217..c227c667 100644 --- a/modules/top-level/output.nix +++ b/modules/top-level/output.nix @@ -5,7 +5,10 @@ helpers, ... }: -with lib; +let + inherit (lib) types mkOption; + inherit (lib) optional optionalString optionalAttrs; +in { options = { viAlias = mkOption { @@ -97,7 +100,7 @@ with lib; # Necessary to make sure the runtime path is set properly in NixOS 22.05, # or more generally before the commit: # cda1f8ae468 - neovim: pass packpath via the wrapper - // optionalAttrs (functionArgs pkgs.neovimUtils.makeNeovimConfig ? configure) { + // optionalAttrs (lib.functionArgs pkgs.neovimUtils.makeNeovimConfig ? configure) { configure.packages = { nixvim = { start = map (x: x.plugin) normalizedPlugins; @@ -115,7 +118,9 @@ with lib; init = helpers.writeLua "init.lua" customRC; extraWrapperArgs = builtins.concatStringsSep " " ( - (optional (config.extraPackages != [ ]) ''--prefix PATH : "${makeBinPath config.extraPackages}"'') + (optional ( + config.extraPackages != [ ] + ) ''--prefix PATH : "${lib.makeBinPath config.extraPackages}"'') ++ (optional config.wrapRc ''--add-flags -u --add-flags "${init}"'') );