1

Using the linux distribution nixos, I have 2 similar problems:

  • I have to add my custom_syntax_color_scheme.vim file to the existing /share/vim/vim80/colors folder in the nix store from existing package nixos.vim

  • I have to add a custom-tex-template.tex file to the existing /share/ghc-8.2.2/x86_64-linux-ghc-8.2.2/pandoc-2.0.6/data/templates/ folder in the nix store from existing package pandoc (I suppose, otherwise it's nixos.texlive.combined.scheme-full)

I have skimmed through the Nix-Pills, but I cannot make my mind about solving this particular problem: adding a configuration file to an existing derivation.

What is the Nix way of doing it?

I suppose I have to create a new derivation that include the file I want, but I don't know how and how the existing package will manage to include it.

My problem feels similar to How to add a file to /etc in NixOS? which now has an answer, but cannot be applied here.

1
  • 1
    What you're trying to do differs from adding a file to /etc. In short, you cannot add files to another package in the Nix store. However, generally speaking, some packages provide optional inputs you can use to configure them. Have you checked the Nixpkgs manual? I know there's a section on VIM, but I'm not sure about Tex. Feb 13, 2019 at 11:43

1 Answer 1

1

In both case, it is not needed to alter the files installed by the package:

  1. Put the custom colorscheme files into the folder ~/.vim/colors. This folder needs to be created.
  2. the option passed to pandoc --template should contain either the template file name with the extension, either the path to the template file name. (I was following the README file blindly, and it was giving command example with the template name without the file extension)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .