mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
c35a930454
I see only one instance of the warning where *equality* of strings is tested and char signedness differs. That one seems perfectly safe. ``` ../libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c: In function 'search_firmwares': ../libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c:70:26: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness [-Wpointer-sign] 70 | if (!g_str_equal(node->name, "enum")) /nix/store/fmqcm52w0p5jmzdbjjskwjiwyj9kqic9-glib-2.74.1-dev/include/glib-2.0/glib/ghash.h:165:39: note: in definition of macro 'g_str_equal' 165 | #define g_str_equal(v1, v2) (strcmp ((v1), (v2)) == 0) | ^~ ```
76 lines
1.6 KiB
Nix
76 lines
1.6 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, fetchpatch
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, gobject-introspection
|
|
, gettext
|
|
, gtk-doc
|
|
, docbook-xsl-nons
|
|
, vala
|
|
, libcap_ng
|
|
, libvirt
|
|
, libxml2
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libvirt-glib";
|
|
version = "4.0.0";
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
src = fetchurl {
|
|
url = "https://libvirt.org/sources/glib/${pname}-${version}.tar.xz";
|
|
sha256 = "hCP3Bp2qR2MHMh0cEeLswoU0DNMsqfwFIHdihD7erL0=";
|
|
};
|
|
|
|
patches = [
|
|
# Fix build with GLib 2.70
|
|
(fetchpatch {
|
|
url = "https://gitlab.com/libvirt/libvirt-glib/-/commit/9a34c4ea55e0246c34896e48b8ecd637bc559ac7.patch";
|
|
sha256 = "UU70uTi55EzPMuLYVKRzpVcd3WogeAtWAWEC2hWlR7k=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
gettext
|
|
gtk-doc
|
|
docbook-xsl-nons
|
|
vala
|
|
gobject-introspection
|
|
];
|
|
|
|
buildInputs = (lib.optionals stdenv.isLinux [
|
|
libcap_ng
|
|
]) ++ [
|
|
libvirt
|
|
libxml2
|
|
gobject-introspection
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
# https://gitlab.com/libvirt/libvirt-glib/-/issues/4
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-sign" ];
|
|
|
|
meta = with lib; {
|
|
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;
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|