virt-manager: Fix error: 'ImportError: No module named libvirt'
The problem was that libvirt 1.2.0 no longer includes the python bindings; it is a separate package now.
This commit is contained in:
parent
f9ca17d4b1
commit
aed957bae7
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, pythonPackages, intltool, libvirt, libxml2Python, curl,
|
{ stdenv, fetchurl, pythonPackages, intltool, libxml2Python, curl,
|
||||||
python, makeWrapper, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc, vte}:
|
python, makeWrapper, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc, vte}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -18,13 +18,13 @@ stdenv.mkDerivation rec {
|
|||||||
paste_deploy m2crypto ipy boto_1_9 twisted sqlalchemy_migrate
|
paste_deploy m2crypto ipy boto_1_9 twisted sqlalchemy_migrate
|
||||||
distutils_extra simplejson readline glance cheetah lockfile httplib2
|
distutils_extra simplejson readline glance cheetah lockfile httplib2
|
||||||
# !!! should libvirt be a build-time dependency? Note that
|
# !!! should libvirt be a build-time dependency? Note that
|
||||||
# libxml2Python is a dependency of libvirt.py.
|
# libxml2Python is a dependency of libvirt.py.
|
||||||
libvirt libxml2Python urlgrabber virtinst pyGtkGlade pythonDBus gnome_python
|
libvirt libxml2Python urlgrabber virtinst pyGtkGlade pythonDBus gnome_python
|
||||||
gtkvnc vte
|
gtkvnc vte
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ pythonPackages.python
|
[ pythonPackages.python
|
||||||
pythonPackages.wrapPython
|
pythonPackages.wrapPython
|
||||||
pythonPackages.mox
|
pythonPackages.mox
|
||||||
pythonPackages.urlgrabber
|
pythonPackages.urlgrabber
|
||||||
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
|||||||
] ++ pythonPath;
|
] ++ pythonPath;
|
||||||
|
|
||||||
buildPhase = "make";
|
buildPhase = "make";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper pythonPackages.wrapPython ];
|
nativeBuildInputs = [ makeWrapper pythonPackages.wrapPython ];
|
||||||
|
|
||||||
# patch the runner script in order to make wrapPythonPrograms work and run the program using a syscall
|
# patch the runner script in order to make wrapPythonPrograms work and run the program using a syscall
|
||||||
|
@ -8195,7 +8195,29 @@ pythonPackages = modules // import ./python-packages-generated.nix {
|
|||||||
description = "A logging replacement for Python";
|
description = "A logging replacement for Python";
|
||||||
license = pkgs.lib.licenses.bsd3;
|
license = pkgs.lib.licenses.bsd3;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libvirt = pkgs.stdenv.mkDerivation rec {
|
||||||
|
name = "libvirt-python-${version}";
|
||||||
|
version = "1.2.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://libvirt.org/sources/python/${name}.tar.gz";
|
||||||
|
sha256 = "0azml1yv9iqnpj4sdg1wwsa70q7kb06lv85p63qwyd8vrd0y7rrg";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ python pkgs.pkgconfig pkgs.libvirt lxml ];
|
||||||
|
|
||||||
|
buildPhase = "python setup.py build";
|
||||||
|
|
||||||
|
installPhase = "python setup.py install --prefix=$out";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = http://www.libvirt.org/;
|
||||||
|
description = "libvirt Python bindings";
|
||||||
|
license = "LGPLv2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# python2.7 specific eggs
|
# python2.7 specific eggs
|
||||||
} // pkgs.lib.optionalAttrs (python.majorVersion == "2.7") {
|
} // pkgs.lib.optionalAttrs (python.majorVersion == "2.7") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user