Skip to content

Commit

Permalink
fix: use previous version of settings $PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Mar 12, 2024
1 parent c2f93fd commit e092693
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
...
}: let
inherit (flake-parts-lib) mkPerSystemOption;
inherit (lib) mkOption types;
inherit (lib) makeBinPath mkOption types unique;

mkNeovimEnv = {
config,
Expand All @@ -15,15 +15,19 @@
in
pkgs.writeShellApplication {
name = "nvim";
runtimeInputs = cfg.paths;
runtimeEnv =
(cfg.env or {})
// {
NVIM_RPLUGIN_MANIFEST = "${config.neovim.build.rplugin}/rplugin.vim";
};
text = ''
${cfg.package}/bin/nvim -u ${cfg.build.initlua} "$@"
'';
text =
lib.optionalString (cfg.paths != [])
''
export PATH="$PATH:${makeBinPath (unique cfg.paths)}"
''
+ ''
${cfg.package}/bin/nvim -u ${cfg.build.initlua} "$@"
'';
derivationArgs.passthru = {
inherit (config.neovim.build) initlua plugins;
};
Expand Down

0 comments on commit e092693

Please sign in to comment.