mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 14:41:27 +00:00
neovim: adding python gui option
- pythonPackages.neovim_gui init
This commit is contained in:
parent
24d5618d23
commit
b7ab0a47de
@ -6,6 +6,7 @@
|
||||
, withPython3 ? true, python3Packages, extraPython3Packages ? []
|
||||
, withJemalloc ? true, jemalloc
|
||||
|
||||
, withPyGUI ? false
|
||||
, vimAlias ? false
|
||||
, configure ? null
|
||||
}:
|
||||
@ -45,7 +46,11 @@ let
|
||||
};
|
||||
|
||||
pythonEnv = pythonPackages.python.buildEnv.override {
|
||||
extraLibs = [ pythonPackages.neovim ] ++ extraPythonPackages;
|
||||
extraLibs = (
|
||||
if withPyGUI
|
||||
then [ pythonPackages.neovim_gui ]
|
||||
else [ pythonPackages.neovim ]
|
||||
) ++ extraPythonPackages;
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
|
||||
@ -103,6 +108,8 @@ let
|
||||
$out/bin/nvim
|
||||
'' + optionalString withPython ''
|
||||
ln -s ${pythonEnv}/bin/python $out/bin/nvim-python
|
||||
'' + optionalString withPyGUI ''
|
||||
ln -s ${pythonEnv}/bin/pynvim $out/bin/pynvim
|
||||
'' + optionalString withPython3 ''
|
||||
ln -s ${python3Env}/bin/python3 $out/bin/nvim-python3
|
||||
'' + optionalString (withPython || withPython3) ''
|
||||
|
@ -20456,6 +20456,34 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
neovim_gui = buildPythonPackage rec {
|
||||
name = "neovim-gui-${self.neovim.version}";
|
||||
disabled = !isPy27;
|
||||
|
||||
src = self.neovim.src;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
self.msgpack
|
||||
self.greenlet
|
||||
self.trollius
|
||||
self.click
|
||||
self.pygobject3
|
||||
pkgs.gobjectIntrospection
|
||||
pkgs.makeWrapper
|
||||
pkgs.gtk3
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i -e "s|entry_points=entry_points,|entry_points=dict(console_scripts=['pynvim=neovim.ui.cli:main [GUI]']),|" setup.py
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/pynvim \
|
||||
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
||||
--prefix PYTHONPATH : "${self.pygobject3}/lib/python2.7/site-packages:$PYTHONPATH"
|
||||
'';
|
||||
};
|
||||
|
||||
ghp-import = buildPythonPackage rec {
|
||||
version = "0.4.1";
|
||||
name = "ghp-import-${version}";
|
||||
|
Loading…
Reference in New Issue
Block a user