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

2017-04-03 Thread Ben Zhang
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@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


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

2017-04-04 Thread Ben Zhang
Thanks everyone for your input! I ended up using zimbatm’s method and made a 
python3 version of `vim_configurable` using `vimUtils.makeCustomizable`. Now 
it’s working great!

My current `vim-config/default.nix`:

```
{ pkgs }:

let
  my_plugins = import ./plugins.nix { inherit (pkgs) vimUtils fetchFromGitHub; 
};
  configurable_nix_path = 
"${}/pkgs/applications/editors/vim/configurable.nix";
  my_vim_configurable = with pkgs; vimUtils.makeCustomizable (callPackage 
configurable_nix_path {
    inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa Foundation 
CoreData;
    inherit (darwin) libobjc cf-private;

    features = "huge"; # one of  tiny, small, normal, big or huge
    lua = pkgs.lua5_1;
    gui = config.vim.gui or "auto";
    python = python3;

    # optional features by flags
    flags = [ "python" "X11" ];
  });

in with pkgs; my_vim_configurable.customize {
  name = "vim";
  vimrcConfig = {
    customRC = ''
      syntax on
      “...
    '';

    vam.knownPlugins = vimPlugins // my_plugins;
    vam.pluginDictionaries = [
      { names = [
        "ctrlp"
        # ...
      ]; }
    ];
  };
}
```

Ben

On Apr 4, 2017, 8:08 PM -0400, Rok Garbas <r...@garbas.si>, wrote:
> Maybe give neovim a try. It is can be configured very similarly and I can 
> confirm that python3 and python support work.
>
> -- garbas
>
> > On 04 April 2017 at 21:42 Linus Heckemann <a...@sphalerite.org> 
> > wrote:src/releng_slavehealth/releng_slavehealth/__init__.py
> >
> >
> > On 04/04/17 17:40, zimbatm wrote:
> > > Look into pkgs/top-level/all-packages.nix. I would start by copying the
> > > definition of vim_configurable from there and set the python argument.
> > >
> > >
> > > On Tue, 4 Apr 2017, 14:08 Ben Zhang, <benzhang...@gmail.com
> > > <mailto:benzhang...@gmail.com>> wrote:
> > >
> > > 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)?
> > >
> >
> >
> > Another potential option would be using package overrides [1] to pass
> > python3 as python to the vim package — something like
> >
> > packageOverrides = pkgs: {
> > vim = pkgs.vim.override { python = pkgs.python3 };
> > };
> >
> > [1]: https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides
> >
> >
> > ___
> > nix-dev mailing list
> > nix-dev@lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
> -- Rok Garbas, https://garbas.si
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


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

2017-04-04 Thread Ben Zhang
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 <zimb...@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, <benzhang...@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@lists.science.uu.nl
> > > http://lists.science.uu.nl/mailman/listinfo/nix-dev
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-commits] [NixOS/nixpkgs] 6d30a3: closurecompiler: 20160208 -> 20170218

2017-04-27 Thread Ben Zhang
  Branch: refs/heads/release-17.03
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 6d30a36d3be7b90235331f0aa14216a7bf3db137
  
https://github.com/NixOS/nixpkgs/commit/6d30a36d3be7b90235331f0aa14216a7bf3db137
  Author: Ben Zhang <benzhang...@gmail.com>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
M pkgs/development/compilers/closure/default.nix

  Log Message:
  ---
  closurecompiler: 20160208 -> 20170218

(cherry picked from commit 1252a3707baece8ccfe02554a0fa973992801226)


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


Re: [Nix-dev] YouCompleteMe (ycmd) server cannot be started: Library not loaded: @loader_path/libclang.dylib

2017-05-02 Thread Ben Zhang
Thanks Domen! Applied changes in your PR and it works perfectly!

Ben

On May 2, 2017, 3:32 AM -0400, Domen Kožar <do...@dev.si>, wrote:
> https://github.com/NixOS/nixpkgs/pull/25352
>
> > On Tue, May 2, 2017 at 9:19 AM, Domen Kožar <do...@dev.si> wrote:
> > > Usually, that's because of https://github.com/NixOS/nixpkgs/issues/21624,
> > > but I don't know the specifics.
> > >
> > > > On Mon, May 1, 2017 at 9:00 PM, Ben Zhang <benzhang...@gmail.com> wrote:
> > > > > Hi all,
> > > > >
> > > > > A while ago, my YouCompleteMe vim plugin stopped working. The client 
> > > > > log file says that it cannot connect to the server, and the server 
> > > > > log file shows the following:
> > > > >
> > > > > > 2017-05-01 14:48:42,343 - ERROR - 
> > > > > > dlopen(/nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycmd/../ycm_core.so,
> > > > > >  2): Library not loaded: @loader_path/libclang.dylib
> > > > > >   Referenced from: 
> > > > > > /nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycm_core.so
> > > > > >   Reason: image not found
> > > > > > Traceback (most recent call last):
> > > > > >   File 
> > > > > > "/nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycmd/server_utils.py",
> > > > > >  line 95, in CompatibleWithCurrentCore
> > > > > >     ycm_core = ImportCore()
> > > > > >   File 
> > > > > > "/nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycmd/server_utils.py",
> > > > > >  line 87, in ImportCore
> > > > > >     import ycm_core as ycm_core
> > > > > > ImportError: 
> > > > > > dlopen(/nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycmd/../ycm_core.so,
> > > > > >  2): Library not loaded: @loader_path/libclang.dylib
> > > > > >   Referenced from: 
> > > > > > /nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycm_core.so
> > > > > >   Reason: image not found
> > > > >
> > > > > Has anyone experienced a similar problem before?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Ben
> > > > >
> > > > >
> > > > > ___
> > > > > nix-dev mailing list
> > > > > nix-dev@lists.science.uu.nl
> > > > > https://mailman.science.uu.nl/mailman/listinfo/nix-dev
> > > > >
> > >
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


[Nix-commits] [NixOS/nixpkgs] 0a4cf8: yarn: 0.23.2 -> 0.23.4

2017-05-08 Thread Ben Zhang
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 0a4cf89ae46d75077aa13929153fbff5b7432d4e
  
https://github.com/NixOS/nixpkgs/commit/0a4cf89ae46d75077aa13929153fbff5b7432d4e
  Author: Ben Zhang <benzhang...@gmail.com>
  Date:   2017-05-08 (Mon, 08 May 2017)

  Changed paths:
M pkgs/development/tools/yarn/default.nix

  Log Message:
  ---
  yarn: 0.23.2 -> 0.23.4


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


[Nix-dev] YouCompleteMe (ycmd) server cannot be started: Library not loaded: @loader_path/libclang.dylib

2017-05-01 Thread Ben Zhang
Hi all,

A while ago, my YouCompleteMe vim plugin stopped working. The client log file 
says that it cannot connect to the server, and the server log file shows the 
following:

> 2017-05-01 14:48:42,343 - ERROR - 
> dlopen(/nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycmd/../ycm_core.so,
>  2): Library not loaded: @loader_path/libclang.dylib
>   Referenced from: 
> /nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycm_core.so
>   Reason: image not found
> Traceback (most recent call last):
>   File 
> "/nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycmd/server_utils.py",
>  line 95, in CompatibleWithCurrentCore
>     ycm_core = ImportCore()
>   File 
> "/nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycmd/server_utils.py",
>  line 87, in ImportCore
>     import ycm_core as ycm_core
> ImportError: 
> dlopen(/nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycmd/../ycm_core.so,
>  2): Library not loaded: @loader_path/libclang.dylib
>   Referenced from: 
> /nix/store/qih75i2liq4n59y5d025z52bfvia81p3-ycmd-2017-03-27/lib/ycmd/ycm_core.so
>   Reason: image not found

Has anyone experienced a similar problem before?

Thanks,

Ben

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev