libvirt: fix dlopen("libjansson.so.4")

Commit 59027e2 broke libvirt broke libvirt/nixops on linux.
Use ${targetPlatform.extensions.sharedLibrary} to accomodate both linux and darwin.
This commit is contained in:
Matthieu Coudron 2018-08-19 22:03:30 +09:00
parent 8395f9aa85
commit 929a53f281

View File

@ -60,7 +60,9 @@ in stdenv.mkDerivation rec {
--replace 'lxc_path,' '"/run/libvirt/nix-emulators/libvirt_lxc",'
patchShebangs . # fixes /usr/bin/python references
'';
substituteInPlace src/util/virjsoncompat.c --replace \
'"libjansson.so.4"' '"${jansson}/lib/libjansson${stdenv.targetPlatform.extensions.sharedLibrary}"'
'';
configureFlags = [
"--localstatedir=/var"