Merge pull request #169221 from gador/fix-virt-manager-setuptools

virt-manager: fix setuptools-61 breaking change
This commit is contained in:
Martin Weinelt 2022-04-18 19:59:28 +02:00 committed by GitHub
commit d829658878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
{ lib, fetchFromGitHub, python3, intltool, file, wrapGAppsHook, gtk-vnc
, vte, avahi, dconf, gobject-introspection, libvirt-glib, system-libvirt
, gsettings-desktop-schemas, libosinfo, gnome, gtksourceview4, docutils, cpio
, e2fsprogs, findutils, gzip, cdrtools, xorriso
, e2fsprogs, findutils, gzip, cdrtools, xorriso, fetchpatch
, spiceSupport ? true, spice-gtk ? null
}:
@ -35,11 +35,21 @@ python3.pkgs.buildPythonApplication rec {
pygobject3 ipaddress libvirt libxml2 requests cdrtools
];
patchPhase = ''
prePatch = ''
sed -i 's|/usr/share/libvirt/cpu_map.xml|${system-libvirt}/share/libvirt/cpu_map.xml|g' virtinst/capabilities.py
sed -i "/'install_egg_info'/d" setup.py
'';
patches = [
# due to a recent change in setuptools-61, "packages=[]" needs to be included
# this patch can hopefully be removed, once virt-manager has an upstream version bump
(fetchpatch {
name = "fix-for-setuptools-61.patch";
url = "https://github.com/virt-manager/virt-manager/commit/46dc0616308a73d1ce3ccc6d716cf8bbcaac6474.patch";
sha256 = "sha256-/RZG+7Pmd7rmxMZf8Fvg09dUggs2MqXZahfRQ5cLcuM=";
})
];
postConfigure = ''
${python3.interpreter} setup.py configure --prefix=$out
'';