2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gettext
|
|
|
|
, vala
|
|
|
|
, libcap_ng
|
|
|
|
, libvirt
|
|
|
|
, libxml2
|
2023-03-15 16:39:30 +00:00
|
|
|
, buildPackages
|
2023-10-19 13:55:26 +00:00
|
|
|
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
|
2023-02-02 18:25:31 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, withDocs ? stdenv.hostPlatform == stdenv.buildPlatform
|
|
|
|
, gtk-doc
|
|
|
|
, docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "libvirt-glib";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "5.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
outputs = [ "out" "dev" ] ++ lib.optional withDocs "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";
|
2024-01-13 08:15:51 +00:00
|
|
|
sha256 = "m/7DRjgkFqNXXYcpm8ZBsqRkqlGf2bEofjGKpDovO4s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
gettext
|
|
|
|
vala
|
|
|
|
gobject-introspection
|
2023-02-02 18:25:31 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
gobject-introspection
|
|
|
|
] ++ lib.optionals withDocs [
|
|
|
|
gtk-doc
|
|
|
|
docbook-xsl-nons
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
buildInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
libvirt
|
|
|
|
libxml2
|
2023-02-02 18:25:31 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
libcap_ng
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
# The build system won't let us build with docs or introspection
|
|
|
|
# unless we're building natively, but will still do a mandatory
|
|
|
|
# check for the dependencies for those things unless we explicitly
|
|
|
|
# disable the options.
|
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonEnable "docs" withDocs)
|
|
|
|
(lib.mesonEnable "introspection" withIntrospection)
|
|
|
|
];
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|