diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index 960591d1a22..0cc4c8b3453 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -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) [