From 8c42b26fa28fbce374e9c9fc6253fc201a2f126b Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Thu, 24 Dec 2015 19:59:44 +0000 Subject: [PATCH] libvirt: switch who makes assertions about whose version Previously, the native libvirt package was making an assertion that the dependent Python package had a compatible version. This commit switches that so that the Python package makes the assertion, since it makes more sense to me to have a child package making an assertion about its parent than vice versa. --- pkgs/development/libraries/libvirt/default.nix | 8 ++------ pkgs/top-level/python-packages.nix | 5 +++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 27e67866fe3..888cf833eab 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -1,16 +1,12 @@ { stdenv, fetchurl, pkgconfig, libxml2, gnutls, devicemapper, perl, python , iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext , libtasn1, ebtables, libgcrypt, yajl, makeWrapper, pmutils, libcap_ng -, dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl -, pythonPackages, perlPackages +, dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages }: -let version = "1.2.19"; in - -assert version == pythonPackages.libvirt.version; - stdenv.mkDerivation rec { name = "libvirt-${version}"; + version = "1.2.19"; src = fetchurl { url = "http://libvirt.org/sources/${name}.tar.gz"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eab64615606..0bcc1714982 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -21724,9 +21724,10 @@ in modules // { }; }; - libvirt = pkgs.stdenv.mkDerivation rec { + libvirt = let + version = "1.2.18"; + in assert version == pkgs.libvirt.version; pkgs.stdenv.mkDerivation rec { name = "libvirt-python-${version}"; - version = "1.2.19"; src = pkgs.fetchurl { url = "http://libvirt.org/sources/python/${name}.tar.gz";