diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index d5c6f1b6cf17..e83fd20e995f 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -352,11 +352,14 @@ stdenv.mkDerivation rec { substituteInPlace $out/bin/virt-xml-validate \ --replace xmllint ${libxml2}/bin/xmllint + # Enable to set some options from the corresponding NixOS module (or other + # places) via environment variables. substituteInPlace $out/libexec/libvirt-guests.sh \ --replace 'ON_BOOT="start"' 'ON_BOOT=''${ON_BOOT:-start}' \ --replace 'ON_SHUTDOWN="suspend"' 'ON_SHUTDOWN=''${ON_SHUTDOWN:-suspend}' \ --replace 'PARALLEL_SHUTDOWN=0' 'PARALLEL_SHUTDOWN=''${PARALLEL_SHUTDOWN:-0}' \ --replace 'SHUTDOWN_TIMEOUT=300' 'SHUTDOWN_TIMEOUT=''${SHUTDOWN_TIMEOUT:-300}' \ + --replace 'START_DELAY=0' 'START_DELAY=''${START_DELAY:-0}' \ --replace "$out/bin" '${gettext}/bin' \ --replace 'lock/subsys' 'lock' \ --replace 'gettext.sh' 'gettext.sh