diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index ff72cc84d265..f2710435c00c 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -9,14 +9,14 @@ with stdenv.lib; -# if you update, also bump pythonPackages.libvirt or it will break +# if you update, also bump or it will break stdenv.mkDerivation rec { name = "libvirt-${version}"; - version = "3.8.0"; + version = "3.10.0"; src = fetchurl { url = "http://libvirt.org/sources/${name}.tar.xz"; - sha256 = "1y83z4jb2by6ara0nw4sivh7svqcrw97yfhqwdscxl4y10saisvk"; + sha256 = "03kb37iv3dvvdlslznlc0njvjpmq082lczmsslz5p4fcwb50kwfz"; }; patches = [ ./build-on-bsd.patch ]; diff --git a/pkgs/development/python-modules/libvirt/default.nix b/pkgs/development/python-modules/libvirt/default.nix new file mode 100644 index 000000000000..5dc33d2d93e1 --- /dev/null +++ b/pkgs/development/python-modules/libvirt/default.nix @@ -0,0 +1,26 @@ +{ stdenv, buildPythonPackage, fetchurl, python, pkgconfig, lxml, libvirt, nose }: + +buildPythonPackage rec { + pname = "libvirt"; + version = "3.10.0"; + + src = assert version == libvirt.version; fetchurl { + url = "http://libvirt.org/sources/python/${pname}-python-${version}.tar.gz"; + sha256 = "1l0fgqjnx76pzkhq540x9sf5fgzlrn0dpay90j2m4iq8nkclcbpw"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libvirt lxml ]; + + checkInputs = [ nose ]; + checkPhase = '' + nosetests + ''; + + meta = with stdenv.lib; { + homepage = http://www.libvirt.org/; + description = "libvirt Python bindings"; + license = licenses.lgpl2; + maintainers = [ maintainers.fpletz ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 607ed3778110..950f78fe9761 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -21936,29 +21936,8 @@ EOF }; }; - libvirt = let - version = "3.8.0"; - in assert version == pkgs.libvirt.version; pkgs.stdenv.mkDerivation rec { - name = "libvirt-python-${version}"; - - src = pkgs.fetchurl { - url = "http://libvirt.org/sources/python/${name}.tar.gz"; - sha256 = "02spx8kfcsnqwsshd7bk2plyic2lbpwzg16sf3csh0avck5akjsz"; - }; - - nativeBuildInputs = [ pkgs.pkgconfig ]; - buildInputs = with self; [ python pkgs.libvirt lxml ]; - - buildPhase = "${python.interpreter} setup.py build"; - - installPhase = "${python.interpreter} setup.py install --prefix=$out"; - - meta = { - homepage = http://www.libvirt.org/; - description = "libvirt Python bindings"; - license = licenses.lgpl2; - maintainers = [ maintainers.fpletz ]; - }; + libvirt = callPackage ../development/python-modules/libvirt { + inherit (pkgs) libvirt; }; rpdb = buildPythonPackage rec {