13 stdenv.mkDerivation rec {
16 libVersion = "0.0.12";
18 src = fetchFromGitHub {
22 sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv";
25 buildInputs = [ glib libvirt json_c ] ++ (lib.optional xenSupport xen);
26 nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
28 configureFlags = lib.optional (!xenSupport) "--disable-xen";
30 # libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here
31 postFixup = lib.optionalString xenSupport ''
32 libvmi="$out/lib/libvmi.so.${libVersion}"
33 oldrpath=$(patchelf --print-rpath "$libvmi")
34 patchelf --set-rpath "$oldrpath:${lib.makeLibraryPath [ xen ]}" "$libvmi"
38 homepage = "https://libvmi.com/";
39 description = "A C library for virtual machine introspection";
41 LibVMI is a C library with Python bindings that makes it easy to monitor the low-level
42 details of a running virtual machine by viewing its memory, trapping on hardware events,
43 and accessing the vCPU registers.
45 license = with licenses; [ gpl3 lgpl3 ];
46 platforms = platforms.linux;
47 maintainers = with maintainers; [ matthiasbeyer ];