pythonPackages.neovim_gui: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-29 13:45:21 -04:00
parent b1ea3cdc67
commit fcb1e3bbba
No known key found for this signature in database
GPG key ID: 9ED59B0AB1EAF573
2 changed files with 36 additions and 31 deletions

View file

@ -0,0 +1,35 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, neovim
, click
, pygobject3
, isPy27
, pkgs
}:
buildPythonPackage rec {
pname = "neovim-pygui";
version = "0.1.3";
disabled = !isPy27;
src = fetchFromGitHub {
owner = "neovim";
repo = "python-gui";
rev = version;
sha256 = "1vpvr3zm3f9sxg1z1cl7f7gi8v1xksjdvxj62qnw65aqj3zqxnkz";
};
propagatedBuildInputs = [ neovim click 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 : "${pygobject3}/lib/python2.7/site-packages:$PYTHONPATH"
'';
}

View file

@ -4435,37 +4435,7 @@ in {
neovim = callPackage ../development/python-modules/neovim {};
neovim_gui = buildPythonPackage rec {
name = "neovim-pygui-${self.neovim.version}";
version = "0.1.3";
disabled = !isPy27;
src = pkgs.fetchFromGitHub {
owner = "neovim";
repo = "python-gui";
rev = version;
sha256 = "1vpvr3zm3f9sxg1z1cl7f7gi8v1xksjdvxj62qnw65aqj3zqxnkz";
};
propagatedBuildInputs = [
self.neovim
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"
'';
};
neovim_gui = callPackage ../development/python-modules/neovim_gui { };
typogrify = buildPythonPackage rec {
name = "typogrify-2.0.7";