libsoup: support cross by disabling gobject-introspection and vala

This commit is contained in:
Rick van Schijndel 2021-05-17 23:25:41 +02:00
parent 6543c0558b
commit 38d700f6b8

View file

@ -1,6 +1,24 @@
{ stdenv, lib, fetchurl, fetchpatch, glib, libxml2, meson, ninja, pkg-config, gnome, libsysprof-capture
, gnomeSupport ? true, sqlite, glib-networking, gobject-introspection, vala
, libpsl, python3, brotli
{ stdenv
, lib
, fetchurl
, glib
, libxml2
, meson
, ninja
, pkg-config
, gnome
, libsysprof-capture
, gnomeSupport ? true
, sqlite
, glib-networking
, gobject-introspection
, withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform
, vala
, withVala ? stdenv.buildPlatform == stdenv.hostPlatform
, libpsl
, python3
, brotli
, fetchpatch
}:
stdenv.mkDerivation rec {
@ -35,7 +53,9 @@ stdenv.mkDerivation rec {
] ++ lib.optionals stdenv.isLinux [
libsysprof-capture
];
nativeBuildInputs = [ meson ninja pkg-config gobject-introspection vala glib ];
nativeBuildInputs = [ meson ninja pkg-config glib ]
++ lib.optional withIntrospection gobject-introspection
++ lib.optional withVala vala;
propagatedBuildInputs = [ glib libxml2 ];
NIX_CFLAGS_COMPILE = [ "-lpthread" ];
@ -43,7 +63,8 @@ stdenv.mkDerivation rec {
mesonFlags = [
"-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency
"-Dgssapi=disabled"
"-Dvapi=enabled"
"-Dvapi=${if withVala then "enabled" else "disabled"}"
"-Dintrospection=${if withIntrospection then "enabled" else "disabled"}"
"-Dgnome=${lib.boolToString gnomeSupport}"
"-Dntlm=disabled"
] ++ lib.optionals (!stdenv.isLinux) [