Merge pull request #113026 from helsinki-systems/libvirt_py3

libvirt: python2 -> python3
This commit is contained in:
Robin Gloster 2021-02-15 13:15:34 -06:00 committed by GitHub
commit 211be6af26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, fetchgit { lib, stdenv, fetchurl, fetchgit
, makeWrapper, autoreconfHook, fetchpatch , makeWrapper, autoreconfHook, fetchpatch
, coreutils, libxml2, gnutls, perl, python2, attr, glib, docutils , coreutils, libxml2, gnutls, perl, python3, attr, glib, docutils
, iproute, readline, lvm2, util-linux, systemd, libpciaccess, gettext , iproute, readline, lvm2, util-linux, systemd, libpciaccess, gettext
, libtasn1, iptables, ebtables, libgcrypt, yajl, pmutils, libcap_ng, libapparmor , libtasn1, iptables, ebtables, libgcrypt, yajl, pmutils, libcap_ng, libapparmor
, dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages
@ -61,7 +61,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
bash-completion pkg-config bash-completion pkg-config
libxml2 gnutls perl python2 readline gettext libtasn1 libgcrypt yajl libxml2 gnutls perl python3 readline gettext libtasn1 libgcrypt yajl
libxslt xhtml1 perlPackages.XMLXPath curl libpcap glib dbus libxslt xhtml1 perlPackages.XMLXPath curl libpcap glib dbus
] ++ optionals stdenv.isLinux [ ] ++ optionals stdenv.isLinux [
audit libpciaccess lvm2 util-linux systemd libnl numad zfs audit libpciaccess lvm2 util-linux systemd libnl numad zfs
@ -90,7 +90,7 @@ in stdenv.mkDerivation rec {
# do not use "''${qemu_kvm}/bin/qemu-kvm" to avoid bound VMs to particular qemu derivations # do not use "''${qemu_kvm}/bin/qemu-kvm" to avoid bound VMs to particular qemu derivations
substituteInPlace src/lxc/lxc_conf.c \ substituteInPlace src/lxc/lxc_conf.c \
--replace 'lxc_path,' '"/run/libvirt/nix-emulators/libvirt_lxc",' --replace 'lxc_path,' '"/run/libvirt/nix-emulators/libvirt_lxc",'
patchShebangs . # fixes /usr/bin/python references patchShebangs .
'' ''
+ (lib.concatStringsSep "\n" (lib.mapAttrsToList patchBuilder overrides)); + (lib.concatStringsSep "\n" (lib.mapAttrsToList patchBuilder overrides));