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:
Ricardo M. Correia 2014-01-09 00:46:47 +01:00 committed by Rok Garbas
parent f9ca17d4b1
commit aed957bae7
2 changed files with 27 additions and 5 deletions

View File

@ -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}:
with stdenv.lib;

View File

@ -8197,6 +8197,28 @@ pythonPackages = modules // import ./python-packages-generated.nix {
};
};
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
} // pkgs.lib.optionalAttrs (python.majorVersion == "2.7") {