From 5d7eabb93fd70264f7e64f02fa3d4334ed01ad09 Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Sat, 10 Aug 2019 13:55:05 +0200 Subject: [PATCH] neovim: add finalPackage option as readOnly --- modules/programs/neovim.nix | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index d32f8f4aa..6aaa3980a 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -111,6 +111,13 @@ in description = "The package to use for the neovim binary."; }; + finalPackage = mkOption { + type = types.package; + visible = false; + readOnly = true; + description = "Resulting customized neovim package."; + }; + configure = mkOption { type = types.attrs; default = {}; @@ -136,13 +143,13 @@ in }; config = mkIf cfg.enable { - home.packages = [ - (pkgs.wrapNeovim cfg.package { - inherit (cfg) - extraPython3Packages withPython3 - extraPythonPackages withPython - withNodeJs withRuby viAlias vimAlias configure; - }) - ]; + home.packages = [ cfg.finalPackage ]; + + programs.neovim.finalPackage = pkgs.wrapNeovim cfg.package { + inherit (cfg) + extraPython3Packages withPython3 + extraPythonPackages withPython + withNodeJs withRuby viAlias vimAlias configure; + }; }; }