How to add an additional configuration file to an existing nix derivation?












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.










share|improve this question




















  • 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.

    – Emmanuel Rosa
    Feb 13 at 11:43
















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.










share|improve this question




















  • 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.

    – Emmanuel Rosa
    Feb 13 at 11:43














1












1








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.










share|improve this question
















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.







configuration nixos






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 14 at 9:57







Stephane Rolland

















asked Feb 12 at 1:34









Stephane RollandStephane Rolland

1,71532437




1,71532437








  • 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.

    – Emmanuel Rosa
    Feb 13 at 11:43














  • 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.

    – Emmanuel Rosa
    Feb 13 at 11:43








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.

– Emmanuel Rosa
Feb 13 at 11:43





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.

– Emmanuel Rosa
Feb 13 at 11:43










1 Answer
1






active

oldest

votes


















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)






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500079%2fhow-to-add-an-additional-configuration-file-to-an-existing-nix-derivation%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    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)






    share|improve this answer




























      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)






      share|improve this answer


























        1












        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)






        share|improve this answer













        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)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 14 at 9:56









        Stephane RollandStephane Rolland

        1,71532437




        1,71532437






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500079%2fhow-to-add-an-additional-configuration-file-to-an-existing-nix-derivation%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?