summary refs log tree commit diff
path: root/pkgs/development/libraries/libsoup
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2022-07-07 21:34:37 +0300
committerArtturin <Artturin@artturin.com>2022-07-08 03:56:47 +0300
commit1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc (patch)
tree642b83508642481cce786f93793d57f65491f9cf /pkgs/development/libraries/libsoup
parentbf15263d1c87f64a86828786b54455fa1210036d (diff)
downloadnixpkgs-1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc.tar
nixpkgs-1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc.tar.gz
nixpkgs-1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc.tar.bz2
nixpkgs-1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc.tar.lz
nixpkgs-1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc.tar.xz
nixpkgs-1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc.tar.zst
nixpkgs-1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc.zip
various: enable gobject-introspection when cross-compiling
and fix cross in some
Diffstat (limited to 'pkgs/development/libraries/libsoup')
-rw-r--r--pkgs/development/libraries/libsoup/default.nix24
1 files changed, 13 insertions, 11 deletions
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/
   '';