14 , withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
15 , gobject-introspection
16 , withDocs ? stdenv.hostPlatform == stdenv.buildPlatform
21 stdenv.mkDerivation rec {
22 pname = "libvirt-glib";
25 outputs = [ "out" "dev" ] ++ lib.optional withDocs "devdoc";
28 url = "https://libvirt.org/sources/glib/${pname}-${version}.tar.xz";
29 sha256 = "m/7DRjgkFqNXXYcpm8ZBsqRkqlGf2bEofjGKpDovO4s=";
34 name = "relax-max-stack-size-limit.patch";
35 url = "https://gitlab.com/libvirt/libvirt-glib/-/commit/062f21ccaa810087637ae24e0eb69f1a0f0a45f5.patch";
36 hash = "sha256-6mvINDd1HYS7oZsyNiyEwdNJfK5I5nPx86TRMq2RevA=";
47 ] ++ lib.optionals withIntrospection [
49 ] ++ lib.optionals withDocs [
57 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
63 # The build system won't let us build with docs or introspection
64 # unless we're building natively, but will still do a mandatory
65 # check for the dependencies for those things unless we explicitly
66 # disable the options.
68 (lib.mesonEnable "docs" withDocs)
69 (lib.mesonEnable "introspection" withIntrospection)
73 description = "Library for working with virtual machines";
75 libvirt-glib wraps libvirt to provide a high-level object-oriented API better
76 suited for glib-based applications, via three libraries:
78 - libvirt-glib - GLib main loop integration & misc helper APIs
79 - libvirt-gconfig - GObjects for manipulating libvirt XML documents
80 - libvirt-gobject - GObjects for managing libvirt objects
82 homepage = "https://libvirt.org/";
83 license = licenses.lgpl2Plus;
84 platforms = platforms.unix;