libvirt: use ebtables from iptables package

main
misuzu 4 years ago
parent cf9ac2b544
commit 12a9f1e625
  1. 19
      pkgs/development/libraries/libvirt/default.nix

@ -22,7 +22,6 @@
, gettext
, libtasn1
, iptables
, ebtables
, libgcrypt
, yajl
, pmutils
@ -68,19 +67,6 @@ with lib;
# if you update, also bump <nixpkgs/pkgs/development/python-modules/libvirt/default.nix> and SysVirt in <nixpkgs/pkgs/top-level/perl-packages.nix>
let
buildFromTarball = stdenv.isDarwin;
# libvirt hardcodes the binary name 'ebtables', but in nixpkgs the ebtables
# binary we want to use is named 'ebtables-legacy'.
# Create a derivation to alias the binary name so that libvirt can find the right one, and use that below.
ebtables-compat = stdenv.mkDerivation {
pname = "ebtables-compat";
version = ebtables.version;
src = null;
buildInputs = [ ebtables ];
buildCommand = ''
mkdir -p $out/bin
ln -sf ${ebtables}/bin/ebtables-legacy $out/bin/ebtables
'';
};
in
stdenv.mkDerivation rec {
pname = "libvirt";
@ -178,7 +164,7 @@ stdenv.mkDerivation rec {
'';
in
''
PATH=${lib.makeBinPath ([ dnsmasq ] ++ optionals stdenv.isLinux [ iproute2 iptables ebtables-compat lvm2 systemd numad ] ++ optionals enableIscsi [ openiscsi ])}:$PATH
PATH=${lib.makeBinPath ([ dnsmasq ] ++ optionals stdenv.isLinux [ iproute2 iptables lvm2 systemd numad ] ++ optionals enableIscsi [ openiscsi ])}:$PATH
# the path to qemu-kvm will be stored in VM's .xml and .save files
# do not use "''${qemu_kvm}/bin/qemu-kvm" to avoid bound VMs to particular qemu derivations
substituteInPlace src/lxc/lxc_conf.c \
@ -226,8 +212,7 @@ stdenv.mkDerivation rec {
postInstall =
let
# Keep the legacy iptables binary for now for backwards compatibility (comment on #109332)
binPath = [ iptables ebtables-compat iproute2 pmutils numad numactl bridge-utils dmidecode dnsmasq ] ++ optionals enableIscsi [ openiscsi ];
binPath = [ iptables iproute2 pmutils numad numactl bridge-utils dmidecode dnsmasq ] ++ optionals enableIscsi [ openiscsi ];
in
''
substituteInPlace $out/libexec/libvirt-guests.sh \

Loading…
Cancel
Save