Unverified Commit 418fda22 authored by ivanbrennan's avatar ivanbrennan
Browse files

nixos.programs.neovim: fix runtime

When this module was first introduced, it processed the runtime option
in a way that nested the resulting files and directories under an etc
directory.
https://github.com/NixOS/nixpkgs/pull/98506/files#diff-685092dbb1852fbf30857fe3505d25dc471dc79d0f31c466523b5f5822b68127R11-R21

That implementation relied on nixos/modules/system/etc/make-etc.sh, a
script that was later removed.
https://github.com/NixOS/nixpkgs/pull/131102/commits/eb7120dc79966d5ed168321fd213de38de13a2b1

The implementation was updated to use linkFarm, which changed the
behavior slightly, in that the configured files and directories are no
longer automatically nested under an etc directory.
https://github.com/NixOS/nixpkgs/commit/307b1253a797f9ab9f5da38a470099945ea7ce04

But the module still configures neovim's runtimepath in a way that
assumes the old nesting behavior.
https://github.com/NixOS/nixpkgs/blob/04f574a1c0fde90b51bf68198e2297ca4e7cccf4/nixos/modules/programs/neovim.nix#L173

Restore the original behavior, nesting runtime files and directories
under an etc directory.
parent 04f574a1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ let

  runtime' = filter (f: f.enable) (attrValues cfg.runtime);

  runtime = pkgs.linkFarm "neovim-runtime" (map (x: { name = x.target; path = x.source; }) runtime');
  runtime = pkgs.linkFarm "neovim-runtime" (map (x: { name = "etc/${x.target}"; path = x.source; }) runtime');

in {
  options.programs.neovim = {