Merge pull request #123549 from Mindavi/libsoup/cross-compilation-staging

libsoup: support cross by disabling gobject-introspection and vala
This commit is contained in:
Michael Raskin 2021-06-22 09:07:23 +00:00 committed by GitHub
commit 9c06f43841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) [