[Nix-dev] Turn on python3 support for vim in configuration.nix

Pavel Chuprikov pschuprikov at gmail.com
Sat Sep 17 13:23:38 CEST 2016


Hi Wink,

There are two features that vim can support: *python* and *python3*. To
determine which one should be turned on vim's nix-expression checks
<https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/configurable.nix#L116>
the version of a python package that was passed to it. To enable *python3* you
need to override vimHugeX:

environment = {
  systemPackages = with pkgs; [
    vimHugeX.override { python = python3; }
  ];
}

Setting *vim.python3 = true *has no effect.

*--*
*Pavel*



сб, 17 сент. 2016 г. в 0:18, Wink Saville <wink at saville.com>:

> By default vim installed via configuration.nix doesn't support python3:
>
> environment = {
>   systemPackages = with pkgs; [
>     vim
>   ];
> }
>
> $ sudo nixos-rebuild test
> $ vim --version | grep python3
> ... -python3 ...
>
> So after much searching and help from #nixos on freenode I found that
> you can add vim_configurable or its alias vimHugeX to turn on a bunch
> of options such as clipboard and python but it doesn't turn on
> python3:
>
> environment = {
>   systemPackages = with pkgs; [
>     vimHugeX
>   ];
> }
>
> $ sudo nixos-rebuild test
> $ vim --version | grep 'python3\|clipboard'
> +clipboard       +iconv           +path_extra      +toolbar
> +cscope          +lispindent      -python3         +vreplace
> +eval            +mouse_dec       +startuptime     +xterm_clipboard
>
>
> This post, https://goo.gl/Bej4Qo, implies you can do it and I added
> 'nixpkgs.config.vim.python3 = true' but it doesn't work:
>
>   nixpkgs.config = {
>     allowUnfree = true;
>     vim.python3 = true;
>   };
>
> environment = {
>   systemPackages = with pkgs; [
>     vimHugeX
>   ];
> }
>
> $ sudo nixos-rebuild test
> $ vim --version | grep 'python3\|clipboard'
> +clipboard       +iconv           +path_extra      +toolbar
> +cscope          +lispindent      -python3         +vreplace
> +eval            +mouse_dec       +startuptime     +xterm_clipboard
>
>
> How how can I turn on python3, i.e. control individual vim
> options/features, in configuration.nix?
>
> -- wink
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160917/58a287f5/attachment.html>


More information about the nix-dev mailing list