mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
libvirt: fix iscsi storage support
Turns out, I was testing #42545 in a nix-shell and forgot how it handles dependencies different from environments.
This commit is contained in:
parent
b8ffd2459d
commit
3f9d968637
|
@ -93,7 +93,10 @@ in stdenv.mkDerivation rec {
|
|||
"sysconfdir=$(out)/var/lib"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
|
||||
postInstall = let
|
||||
binPath = [ iptables iproute pmutils numad numactl bridge-utils dmidecode dnsmasq ebtables ] ++ optionals enableIscsi [ openiscsi ];
|
||||
in ''
|
||||
substituteInPlace $out/libexec/libvirt-guests.sh \
|
||||
--replace 'ON_SHUTDOWN=suspend' 'ON_SHUTDOWN=''${ON_SHUTDOWN:-suspend}' \
|
||||
--replace "$out/bin" '${gettext}/bin' \
|
||||
|
@ -106,7 +109,7 @@ in stdenv.mkDerivation rec {
|
|||
substituteInPlace $out/lib/systemd/system/libvirtd.service --replace /bin/kill ${coreutils}/bin/kill
|
||||
rm $out/lib/systemd/system/{virtlockd,virtlogd}.*
|
||||
wrapProgram $out/sbin/libvirtd \
|
||||
--prefix PATH : /run/libvirt/nix-emulators:${makeBinPath [ iptables iproute pmutils numad numactl bridge-utils dmidecode dnsmasq ebtables ]}
|
||||
--prefix PATH : /run/libvirt/nix-emulators:${makeBinPath binPath}
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
|
Loading…
Reference in a new issue