From 2cd0c2e2df0075b9ea88b8b98db39cd71f214456 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Mon, 25 Jun 2018 13:11:56 +0200 Subject: [PATCH] libvirt: enable (optional) support for iscsi storage (#42545) --- pkgs/development/libraries/libvirt/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index cb81aa262e9..49c1b054b77 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -6,6 +6,7 @@ , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages , curl, libiconv, gmp, zfs, parted, bridge-utils, dmidecode , enableXen ? false, xen ? null +, enableIscsi ? false, openiscsi }: with stdenv.lib; @@ -42,6 +43,8 @@ in stdenv.mkDerivation rec { libapparmor libcap_ng numactl attr parted ] ++ optionals (enableXen && stdenv.isLinux && stdenv.isx86_64) [ xen + ] ++ optionals enableIscsi [ + openiscsi ] ++ optionals stdenv.isDarwin [ libiconv gmp ]; @@ -49,7 +52,7 @@ in stdenv.mkDerivation rec { preConfigure = '' ${ optionalString (!buildFromTarball) "./bootstrap --no-git --gnulib-srcdir=$(pwd)/.gnulib" } - PATH=${stdenv.lib.makeBinPath ([ dnsmasq ] ++ optionals stdenv.isLinux [ iproute iptables ebtables lvm2 systemd numad ])}:$PATH + PATH=${stdenv.lib.makeBinPath ([ dnsmasq ] ++ optionals stdenv.isLinux [ iproute iptables ebtables 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 @@ -79,6 +82,8 @@ in stdenv.mkDerivation rec { "--with-storage-disk" ] ++ optionals (stdenv.isLinux && zfs != null) [ "--with-storage-zfs" + ] ++ optionals enableIscsi [ + "--with-storage-iscsi" ] ++ optionals stdenv.isDarwin [ "--with-init-script=none" ];