libsoup_3: re-disable introspection if no emulator

e.g. when cross compiling from Linux to FreeBSD.
This commit is contained in:
Alyssa Ross 2023-01-26 12:20:11 +00:00
parent 98580952f5
commit 69b87ae0ec
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -9,7 +9,9 @@
, libsysprof-capture
, sqlite
, glib-networking
, buildPackages
, gobject-introspection
, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages
, vala
, libpsl
, python3
@ -22,7 +24,7 @@ stdenv.mkDerivation rec {
pname = "libsoup";
version = "3.2.2";
outputs = [ "out" "dev" "devdoc" ];
outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
@ -39,6 +41,7 @@ stdenv.mkDerivation rec {
pkg-config
glib
python3
] ++ lib.optionals withIntrospection [
gi-docgen
gobject-introspection
vala
@ -61,15 +64,16 @@ stdenv.mkDerivation rec {
mesonFlags = [
"-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency
"-Dgssapi=disabled"
"-Dvapi=enabled"
"-Dintrospection=enabled"
"-Dntlm=disabled"
# Requires wstest from autobahn-testsuite.
"-Dautobahn=disabled"
# Requires gnutls, not added for closure size.
"-Dpkcs11_tests=disabled"
] ++ lib.optionals (!stdenv.isLinux) [
"-Dsysprof=disabled"
(lib.mesonEnable "docs" withIntrospection)
(lib.mesonEnable "introspection" withIntrospection)
(lib.mesonEnable "sysprof" stdenv.isLinux)
(lib.mesonEnable "vapi" withIntrospection)
];
# TODO: For some reason the pkg-config setup hook does not pick this up.