Hi,
I’m trying to build a remote plugin for neovim and it requires some node packages being installed.
In my home-manager configuration I have:
vim-todoist = pkgs.vimUtils.buildVimPlugin {
name = "todoist.nvim";
src = pkgs.fetchFromGitHub { ... };
};
...
plugins = [ vim-todoist ]
It installs the plugin just fine, but now it requires Node.js modules. The repository comes with package.json
file and technically I can use node2nix:
postInstall = ''
${pkgs.node2nix}/bin/node2nix # genrates nix expressions from package.json
cp *.nix $out/
'';
Now, how do I use generated nix expression? If I try to refer to that file I get a string that refers to a store path cannot be appended to a path
. Which kind of makes sense - it doesn’t feel very reproducible. Just storing it separately also feels very bloated.
Although this node2nix-specific question, I think same applies for other generators, like pypi2nix, cabal2nix etc.