libvmi: 0.12.0 -> 0.14.0-unstable-2024-08-06, libkvmi: init at 1.1.0-unstable-2023-12-13 (#328873)

This commit is contained in:
Sandro
2024-09-11 17:34:47 +02:00
committed by GitHub
4 changed files with 149 additions and 52 deletions
+52
View File
@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
unstableGitUpdater,
autoreconfHook,
autoconf-archive,
pkg-config,
glib,
libuuid,
}:
stdenv.mkDerivation {
pname = "libkvmi";
version = "1.1.0-unstable-2023-12-13";
outputs = [
"out"
"lib"
"dev"
];
src = fetchFromGitHub {
owner = "bitdefender";
repo = "libkvmi";
rev = "bc80de986bda1b891a1106badf87587bb92dbbb3";
hash = "sha256-evYRIwguaKgJ8pMhhKKkSc/65GDYnG6DoYRMSkLjowI=";
};
nativeBuildInputs = [
autoreconfHook
autoconf-archive
pkg-config
];
buildInputs = [
glib
libuuid
];
passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; };
meta = {
description = "KVM virtual machine introspection library";
homepage = "https://github.com/bitdefender/libkvmi";
license = lib.licenses.lgpl3Only;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ sigmasquadron ];
mainProgram = "hookguest-libkvmi";
outputsToInstall = [ "lib" ];
};
}
+97
View File
@@ -0,0 +1,97 @@
{
lib,
stdenv,
fetchFromGitHub,
unstableGitUpdater,
autoreconfHook,
autoconf-archive,
bison,
flex,
glib,
pkg-config,
json_c,
libvirt,
withVMIFS ? true,
fuse,
legacyKVM ? false,
libkvmi,
xenSupport ? true,
xen-slim,
}:
let
pname = "libvmi";
version = "0.14.0-unstable-2024-08-06";
libVersion = "0.0.15";
src = fetchFromGitHub {
owner = "libvmi";
repo = "libvmi";
rev = "bdb9ffb8f1f70b425454bc41da2be353cc6cbf5c";
hash = "sha256-5K+9Qq5vGeYYy8kqWIeO25iNJoD/HvtyircH6odr/qA=";
};
in
stdenv.mkDerivation {
inherit pname version src;
outputs = [
"out"
"lib"
"dev"
];
nativeBuildInputs = [
autoreconfHook
autoconf-archive
bison
flex
pkg-config
];
buildInputs =
[
glib
json_c
libvirt
]
++ lib.optionals xenSupport [ xen-slim ]
++ lib.optionals (!legacyKVM) [ libkvmi ]
++ lib.optionals withVMIFS [ fuse ];
configureFlags =
lib.optionals (!xenSupport) [ "--disable-xen" ]
++ lib.optionals legacyKVM [ "--enable-kvm-legacy" ]
++ lib.optionals withVMIFS [ "--enable-vmifs" ];
# libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here
postFixup = lib.optionalString xenSupport ''
libvmi="$lib/lib/libvmi.so.${libVersion}"
oldrpath=$(patchelf --print-rpath "$libvmi")
patchelf --set-rpath "$oldrpath:${lib.makeLibraryPath [ xen-slim ]}" "$libvmi"
'';
passthru = {
updateScript = unstableGitUpdater { tagPrefix = "v"; };
inherit libVersion;
};
meta = {
description = "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.
'';
homepage = "https://libvmi.com/";
license = with lib.licenses; [
gpl3Only
lgpl3Only
];
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ sigmasquadron ];
};
}
@@ -1,50 +0,0 @@
{ lib, stdenv,
fetchFromGitHub,
autoreconfHook,
bison,
flex,
glib,
pkg-config,
json_c,
xen,
libvirt,
xenSupport ? true }:
stdenv.mkDerivation rec {
pname = "libvmi";
version = "0.12.0";
libVersion = "0.0.12";
src = fetchFromGitHub {
owner = "libvmi";
repo = "libvmi";
rev = "v${version}";
sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv";
};
buildInputs = [ glib libvirt json_c ] ++ (lib.optional xenSupport xen);
nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
configureFlags = lib.optional (!xenSupport) "--disable-xen";
# libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here
postFixup = lib.optionalString xenSupport ''
libvmi="$out/lib/libvmi.so.${libVersion}"
oldrpath=$(patchelf --print-rpath "$libvmi")
patchelf --set-rpath "$oldrpath:${lib.makeLibraryPath [ xen ]}" "$libvmi"
'';
meta = with lib; {
homepage = "https://libvmi.com/";
description = "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 ];
platforms = platforms.linux;
maintainers = [ ];
broken = true;
};
}
-2
View File
@@ -31407,8 +31407,6 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Foundation;
};
libvmi = callPackage ../development/libraries/libvmi { };
libutp = callPackage ../applications/networking/p2p/libutp { };
libutp_3_4 = callPackage ../applications/networking/p2p/libutp/3.4.nix { };