[Nix-dev] Turn on python3 support for vim in configuration.nix
Pavel Chuprikov
pschuprikov at gmail.com
Sat Sep 17 21:40:06 CEST 2016
This is just a dependency among the vim configure flags. Basically, if you
use only *tiny* set of features then it won't be enough to support *python *or
*ruby*, for example.
To try *tiny* you need to add:
vim.python = false;
vim.ruby = false;
to your* configuration.nix*.
--
Pavel
сб, 17 сент. 2016 г. в 17:53, Wink Saville <wink at saville.com>:
> On Sat, Sep 17, 2016 at 4:23 AM, Pavel Chuprikov <pschuprikov at gmail.com>
> wrote:
> > 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 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; }
> > ];
> > }
>
> Thanks, it needed one minor tweak, it need parens around the
> '(vimHugeX.override {..})':
>
> environment = {
> systemPackages = with pkgs; [
> (vimHugeX.override { python = python3; })
> ];
> }
>
> Out of curiosity, I tried to change the features to "tiny":
> environment = {
> systemPackages = with pkgs; [
> (vimHugeX.override { features = "tiny" })
> ];
> }
>
> But rebuild gives an error that python isn't supported:
>
> configure: error: cannot use Python with tiny or small features
>
> I looked in pkgs/**/editors/vim/configurable.nix and can see various
> places python is mentioned but I'm not familiar enough with the
> nix language to ferret out how to disable it. Do you happen to know?
>
>
> > --
> > 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/0ae1a2ca/attachment-0001.html>
More information about the nix-dev
mailing list