diff options
author | Ricardo M. Correia <rcorreia@wizy.org> | 2014-01-09 00:46:47 +0100 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2014-01-11 22:01:52 +0100 |
commit | aed957bae710a77c000d01e6aba934f1b3008d0a (patch) | |
tree | 653202e38a97d062dfff44fbb720534511f99b0f /pkgs/top-level | |
parent | f9ca17d4b175a35b738c12db9406a8c2d4cd2274 (diff) | |
download | nixlib-aed957bae710a77c000d01e6aba934f1b3008d0a.tar nixlib-aed957bae710a77c000d01e6aba934f1b3008d0a.tar.gz nixlib-aed957bae710a77c000d01e6aba934f1b3008d0a.tar.bz2 nixlib-aed957bae710a77c000d01e6aba934f1b3008d0a.tar.lz nixlib-aed957bae710a77c000d01e6aba934f1b3008d0a.tar.xz nixlib-aed957bae710a77c000d01e6aba934f1b3008d0a.tar.zst nixlib-aed957bae710a77c000d01e6aba934f1b3008d0a.zip |
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.
Diffstat (limited to 'pkgs/top-level')
-rw-r--r-- | pkgs/top-level/python-packages.nix | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 60b7e00f019d..18d323111739 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8195,7 +8195,29 @@ pythonPackages = modules // import ./python-packages-generated.nix { description = "A logging replacement for Python"; 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 } // pkgs.lib.optionalAttrs (python.majorVersion == "2.7") { |