From cf4087bef2a00458ccab7b6c6c2e0c2bd30a85c9 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 15 Sep 2021 10:37:33 +0200 Subject: vim: fix build due to dependency on pname --- common/vim.nix | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/common/vim.nix b/common/vim.nix index 42e3c45..2a70864 100644 --- a/common/vim.nix +++ b/common/vim.nix @@ -11,9 +11,9 @@ let cfg = config.vim; - myConfigPackage = with lib; - pkgs.writeTextDir - "share/vim-plugins/myConfig/lua/myConfig.lua" + myConfigPackage = + with lib; + let config = '' -- Autogenerated variables from the NixOS configuration @@ -31,6 +31,19 @@ let ${cfg.luaConfig} ''; + in + pkgs.runCommand + "myConfig" + { + pname = "myConfig"; + inherit config; + passAsFile = [ "config" ]; + runLocal = true; + } + '' + mkdir -p "$out/lua" + mv "$configPath" "$out/lua/myConfig.lua" + ''; myNeovim = wrapNeovim neovim-unwrapped { configure = { @@ -108,7 +121,7 @@ in variables = mkOption { type = types.attrsOf luaFormat.type; - default = {}; + default = { }; description = "Extra global variables to add at the beginning of the vim configuration."; }; -- cgit v1.2.3