[Nix-dev] Overriding python with python3 in vim_configurable.customize

Ben Zhang benzhangniu at gmail.com
Tue Apr 4 14:38:11 CEST 2017


From the source code, it doesn’t seem to accept a python argument (https://github.com/nicknovitski/nixpkgs/blob/master/pkgs/misc/vim-plugins/vim-utils.nix#L291-L295). Is there another way to override `python` with `python3` (https://github.com/NixOS/nixpkgs/pull/8125#issuecomment-169471686)?

Thanks,

Ben

On Apr 4, 2017, 4:02 AM -0400, zimbatm <zimbatm at zimbatm.com>, wrote:
> The "with" keyword binds the designated attrset pairs into scope. It doesn't override other called function variables though.
> Do you know if the customise function accepts a python argument as an input?
>
> > On Tue, 4 Apr 2017, 06:04 Ben Zhang, <benzhangniu at gmail.com> wrote:
> > > Hello everyone,
> > >
> > > I am following [this](https://github.com/kamilchm/.nixpkgs/blob/master/vim-config/default.nix) template for configuring my custom vim with Nix. My `vim-config/default.nix` is as follows:
> > >
> > >     { pkgs }:
> > >
> > >     let
> > >       my_plugins = import ./plugins.nix { inherit (pkgs) vimUtils fetchFromGitHub; };
> > >     in with (pkgs // { python = pkgs.python3; }); vim_configurable.customize {
> > >       name = "vim";
> > >       vimrcConfig = {
> > >         customRC = ''
> > >           syntax on
> > >           filetype on
> > >           " ...
> > >         '';
> > >
> > >         vam.knownPlugins = vimPlugins // my_plugins;
> > >         vam.pluginDictionaries = [
> > >           { names = [
> > >             "ctrlp"
> > >             # ...
> > >           ]; }
> > >         ];
> > >       };
> > >     }
> > >
> > > Although there is a `(pkgs // { python = pkgs.python3; })` override on line 5, python3 is still not used (when I run `vim --version` it shows `+python -python3`). Am I missing anything?
> > >
> > > Thanks,
> > >
> > > Ben
> > >
> > > _______________________________________________
> > > 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/20170404/b341f777/attachment-0001.html>


More information about the nix-dev mailing list