libsoup_3: support cross-compilation

Update to latest state of affairs, now gobject can be used for cross we can enable it.
pkg-config in depsBuildBuild is required for meson to pick up dependencies only used on build platform.
This commit is contained in:
Rick van Schijndel 2022-10-20 18:36:27 +02:00 committed by Rick van Schijndel
parent 368ccb66da
commit 6d9a9c7218

View file

@ -10,9 +10,7 @@
, sqlite , sqlite
, glib-networking , glib-networking
, gobject-introspection , gobject-introspection
, withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform
, vala , vala
, withVala ? stdenv.buildPlatform == stdenv.hostPlatform
, libpsl , libpsl
, python3 , python3
, gi-docgen , gi-docgen
@ -31,6 +29,10 @@ stdenv.mkDerivation rec {
sha256 = "sha256-ses9LDvkn7vQUacfZTLJYmvOzqaXgxkGkM1+Tf3yjyk="; sha256 = "sha256-ses9LDvkn7vQUacfZTLJYmvOzqaXgxkGkM1+Tf3yjyk=";
}; };
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [ nativeBuildInputs = [
meson meson
ninja ninja
@ -38,9 +40,7 @@ stdenv.mkDerivation rec {
glib glib
python3 python3
gi-docgen gi-docgen
] ++ lib.optionals withIntrospection [
gobject-introspection gobject-introspection
] ++ lib.optionals withVala [
vala vala
]; ];
@ -61,8 +61,8 @@ stdenv.mkDerivation rec {
mesonFlags = [ mesonFlags = [
"-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency "-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency
"-Dgssapi=disabled" "-Dgssapi=disabled"
"-Dvapi=${if withVala then "enabled" else "disabled"}" "-Dvapi=enabled"
"-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" "-Dintrospection=enabled"
"-Dntlm=disabled" "-Dntlm=disabled"
# Requires wstest from autobahn-testsuite. # Requires wstest from autobahn-testsuite.
"-Dautobahn=disabled" "-Dautobahn=disabled"