2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2021-10-14 00:43:12 +00:00
|
|
|
, fetchpatch
|
2021-05-20 23:08:51 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gobject-introspection
|
|
|
|
, gettext
|
|
|
|
, gtk-doc
|
|
|
|
, docbook-xsl-nons
|
|
|
|
, vala
|
|
|
|
, libcap_ng
|
|
|
|
, libvirt
|
|
|
|
, libxml2
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "libvirt-glib";
|
|
|
|
version = "4.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "https://libvirt.org/sources/glib/${pname}-${version}.tar.xz";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "hCP3Bp2qR2MHMh0cEeLswoU0DNMsqfwFIHdihD7erL0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
patches = [
|
|
|
|
# Fix build with GLib 2.70
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/libvirt/libvirt-glib/-/commit/9a34c4ea55e0246c34896e48b8ecd637bc559ac7.patch";
|
|
|
|
sha256 = "UU70uTi55EzPMuLYVKRzpVcd3WogeAtWAWEC2hWlR7k=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
gettext
|
|
|
|
gtk-doc
|
|
|
|
docbook-xsl-nons
|
|
|
|
vala
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = (lib.optionals stdenv.isLinux [
|
2021-05-20 23:08:51 +00:00
|
|
|
libcap_ng
|
2022-08-12 12:06:08 +00:00
|
|
|
]) ++ [
|
2021-05-20 23:08:51 +00:00
|
|
|
libvirt
|
|
|
|
libxml2
|
|
|
|
gobject-introspection
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# https://gitlab.com/libvirt/libvirt-glib/-/issues/4
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-sign" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for working with virtual machines";
|
|
|
|
longDescription = ''
|
|
|
|
libvirt-glib wraps libvirt to provide a high-level object-oriented API better
|
|
|
|
suited for glib-based applications, via three libraries:
|
|
|
|
|
|
|
|
- libvirt-glib - GLib main loop integration & misc helper APIs
|
|
|
|
- libvirt-gconfig - GObjects for manipulating libvirt XML documents
|
|
|
|
- libvirt-gobject - GObjects for managing libvirt objects
|
|
|
|
'';
|
|
|
|
homepage = "https://libvirt.org/";
|
|
|
|
license = licenses.lgpl2Plus;
|
2022-08-12 12:06:08 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|