From 1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 7 Jul 2022 21:34:37 +0300 Subject: various: enable gobject-introspection when cross-compiling and fix cross in some --- pkgs/development/libraries/libsoup/default.nix | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'pkgs/development/libraries/libsoup') diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index 83fb0c4a029..ea91173540e 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -8,16 +8,13 @@ , 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 +, gnomeSupport ? true +, sqlite +, glib-networking }: stdenv.mkDerivation rec { @@ -31,19 +28,20 @@ stdenv.mkDerivation rec { sha256 = "sha256-8KQnZW5f4Z4d9xwQfojfobLmc8JcVHt4I7YBi0DQEVk="; }; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ meson ninja pkg-config glib - ] ++ lib.optionals withIntrospection [ gobject-introspection - ] ++ lib.optionals withVala [ vala ]; buildInputs = [ - python3 sqlite libpsl glib.out @@ -60,8 +58,6 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency "-Dgssapi=disabled" - "-Dvapi=${if withVala then "enabled" else "disabled"}" - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" "-Dgnome=${lib.boolToString gnomeSupport}" "-Dntlm=disabled" ] ++ lib.optionals (!stdenv.isLinux) [ @@ -73,6 +69,12 @@ stdenv.mkDerivation rec { doCheck = false; # ERROR:../tests/socket-test.c:37:do_unconnected_socket_test: assertion failed (res == SOUP_STATUS_OK): (2 == 200) postPatch = '' + # fixes finding vapigen when cross-compiling + # the commit is in 3.0.6 + # https://gitlab.gnome.org/GNOME/libsoup/-/commit/5280e936d0a76f94dbc5d8489cfbdc0a06343f65 + substituteInPlace meson.build \ + --replace "required: vapi_opt)" "required: vapi_opt, native: false)" + patchShebangs libsoup/ ''; -- cgit 1.4.1