[Nix-dev] How do I change vim compile options from my configuration.nix?

Matthias Beyer mail at beyermatthias.de
Wed Nov 25 18:42:40 CET 2015


On 25-11-2015 18:36:12, Anders Lundstedt wrote:
> On Wed, Nov 25, 2015 at 6:22 PM,  <joachifm at fastmail.fm> wrote:
> > One way to achieve this is via ~/.nixpkgs/config.nix. Vim happens to
> > have a configurable variant. Something like (untested)
> > ```nix
> > {
> >   vim.python3 = true;
> > }
> > ```
> 
> I do not have a ~/.nixpkgs/config.nix. I created one with those three
> lines but that did not help. I then tried to put the line "vim.python3
> = true;" in my configuration.nix, which gave the following error when
> doing "nix-rebuild --switch":
> 
> error: The option `vim' defined in `/path/to/configuration.nix' does not exist.
> 
> 
> > See `<nixpkgs/pkgs/applications/editors/vim/configurable.nix>`
> > for details.
> 
> Since I do not know the nix language that file is unfortunately mostly
> gibberish to me.

Maybe my new blog post can help you a bit[0].

I'm rather sure you can alter the part with

     vim = lib.overrideDerivation custom_vim (o: {

to contain a

    python = pkgs.python3

or something like this. Of course you don't have to use the setup I
describe there...

[0]: https://beyermatthias.de/blog/2015/11/25/how-to-setup-neo-vim-on-nixos/

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20151125/314fe3b8/attachment.bin 


More information about the nix-dev mailing list