nixpkgs/pkgs/development/libraries/libvmi/default.nix

52 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv,
2018-06-27 22:24:47 +00:00
fetchFromGitHub,
autoreconfHook,
bison,
flex,
glib,
pkg-config,
2018-06-27 22:24:47 +00:00
json_c,
xen,
libvirt,
xenSupport ? true }:
2017-06-11 17:49:33 +00:00
with lib;
2017-06-11 17:49:33 +00:00
stdenv.mkDerivation rec {
pname = "libvmi";
version = "0.12.0";
libVersion = "0.0.12";
2017-06-11 17:49:33 +00:00
src = fetchFromGitHub {
owner = "libvmi";
repo = "libvmi";
rev = "v${version}";
2018-06-27 22:24:47 +00:00
sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv";
2017-06-11 17:49:33 +00:00
};
buildInputs = [ glib libvirt json_c ] ++ (optional xenSupport xen);
nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
2017-06-11 17:49:33 +00:00
configureFlags = optional (!xenSupport) "--disable-xen";
# libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here
postFixup = optionalString xenSupport ''
libvmi="$out/lib/libvmi.so.${libVersion}"
oldrpath=$(patchelf --print-rpath "$libvmi")
patchelf --set-rpath "$oldrpath:${makeLibraryPath [ xen ]}" "$libvmi"
'';
meta = with lib; {
homepage = "https://libvmi.com/";
2017-06-11 17:49:33 +00:00
description = "A C library for virtual machine introspection";
longDescription = ''
LibVMI is a C library with Python bindings that makes it easy to monitor the low-level
details of a running virtual machine by viewing its memory, trapping on hardware events,
and accessing the vCPU registers.
'';
license = with licenses; [ gpl3 lgpl3 ];
2018-07-03 17:17:51 +00:00
platforms = platforms.linux;
maintainers = with maintainers; [ matthiasbeyer ];
2017-06-11 17:49:33 +00:00
};
}