summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorajs124 <ajs124@users.noreply.github.com>2018-06-25 13:11:56 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-06-25 13:11:56 +0200
commit2cd0c2e2df0075b9ea88b8b98db39cd71f214456 (patch)
tree581b9d95cef873786a2f0f2a04edcc1826a3e582 /pkgs
parente0208b9d3ad0099cfb677067825bb9045441b30e (diff)
downloadnixlib-2cd0c2e2df0075b9ea88b8b98db39cd71f214456.tar
nixlib-2cd0c2e2df0075b9ea88b8b98db39cd71f214456.tar.gz
nixlib-2cd0c2e2df0075b9ea88b8b98db39cd71f214456.tar.bz2
nixlib-2cd0c2e2df0075b9ea88b8b98db39cd71f214456.tar.lz
nixlib-2cd0c2e2df0075b9ea88b8b98db39cd71f214456.tar.xz
nixlib-2cd0c2e2df0075b9ea88b8b98db39cd71f214456.tar.zst
nixlib-2cd0c2e2df0075b9ea88b8b98db39cd71f214456.zip
libvirt: enable (optional) support for iscsi storage (#42545)
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/libvirt/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix
index cb81aa262e92..49c1b054b77a 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"
   ];