libvirt-glib: fix cross

This commit is contained in:
Alyssa Ross
2023-01-29 10:45:22 +00:00
parent d677fcb10f
commit 6f024f8dd3
@@ -5,21 +5,23 @@
, meson
, ninja
, pkg-config
, gobject-introspection
, gettext
, gtk-doc
, docbook-xsl-nons
, vala
, libcap_ng
, libvirt
, libxml2
, withIntrospection ? stdenv.hostPlatform == stdenv.buildPlatform
, gobject-introspection
, withDocs ? stdenv.hostPlatform == stdenv.buildPlatform
, gtk-doc
, docbook-xsl-nons
}:
stdenv.mkDerivation rec {
pname = "libvirt-glib";
version = "4.0.0";
outputs = [ "out" "dev" "devdoc" ];
outputs = [ "out" "dev" ] ++ lib.optional withDocs "devdoc";
src = fetchurl {
url = "https://libvirt.org/sources/glib/${pname}-${version}.tar.xz";
@@ -39,22 +41,35 @@ stdenv.mkDerivation rec {
ninja
pkg-config
gettext
gtk-doc
docbook-xsl-nons
vala
gobject-introspection
] ++ lib.optionals withIntrospection [
gobject-introspection
] ++ lib.optionals withDocs [
gtk-doc
docbook-xsl-nons
];
buildInputs = (lib.optionals stdenv.isLinux [
libcap_ng
]) ++ [
buildInputs = [
libvirt
libxml2
] ++ lib.optionals stdenv.isLinux [
libcap_ng
] ++ lib.optionals withIntrospection [
gobject-introspection
];
strictDeps = true;
# 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)
];
# https://gitlab.com/libvirt/libvirt-glib/-/issues/4
NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-sign" ];