summary refs log tree commit diff
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2022-08-07 01:48:42 +0300
committerArtturin <Artturin@artturin.com>2022-09-07 21:20:54 +0300
commitda9a9a440415b236f22f57ba67a24ab3fb53f595 (patch)
tree4e4051387f30d70f4de11e846b16067a02f0d79b
parenta32cd711efe2b934b7a32b175f15ecba9962ba9b (diff)
downloadnixpkgs-da9a9a440415b236f22f57ba67a24ab3fb53f595.tar
nixpkgs-da9a9a440415b236f22f57ba67a24ab3fb53f595.tar.gz
nixpkgs-da9a9a440415b236f22f57ba67a24ab3fb53f595.tar.bz2
nixpkgs-da9a9a440415b236f22f57ba67a24ab3fb53f595.tar.lz
nixpkgs-da9a9a440415b236f22f57ba67a24ab3fb53f595.tar.xz
nixpkgs-da9a9a440415b236f22f57ba67a24ab3fb53f595.tar.zst
nixpkgs-da9a9a440415b236f22f57ba67a24ab3fb53f595.zip
treewide: cross fixes
-rw-r--r--pkgs/applications/networking/browsers/netsurf/libnsgif.nix5
-rw-r--r--pkgs/desktops/gnome/apps/gnome-characters/default.nix8
-rw-r--r--pkgs/desktops/gnome/apps/gnome-clocks/default.nix3
-rw-r--r--pkgs/desktops/gnome/apps/gnome-logs/default.nix15
-rw-r--r--pkgs/desktops/gnome/apps/gnome-weather/default.nix3
-rw-r--r--pkgs/desktops/gnome/apps/seahorse/default.nix9
-rw-r--r--pkgs/desktops/gnome/core/gdm/default.nix2
-rw-r--r--pkgs/desktops/gnome/core/gnome-bluetooth/default.nix3
-rw-r--r--pkgs/desktops/gnome/core/gnome-font-viewer/default.nix1
-rw-r--r--pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix2
-rw-r--r--pkgs/desktops/gnome/core/gnome-system-monitor/default.nix1
-rw-r--r--pkgs/desktops/gnome/core/gnome-themes-extra/default.nix2
-rw-r--r--pkgs/development/libraries/clutter/default.nix2
-rw-r--r--pkgs/development/libraries/cogl/default.nix4
-rw-r--r--pkgs/development/libraries/gcr/default.nix3
-rw-r--r--pkgs/development/libraries/geocode-glib/default.nix3
-rw-r--r--pkgs/development/libraries/gexiv2/default.nix7
-rw-r--r--pkgs/development/libraries/gjs/default.nix7
-rw-r--r--pkgs/development/libraries/gnome-menus/default.nix4
-rw-r--r--pkgs/development/libraries/grilo/default.nix3
-rw-r--r--pkgs/development/libraries/gspell/default.nix8
-rw-r--r--pkgs/development/libraries/gtkmm/3.x.nix11
-rw-r--r--pkgs/development/libraries/gusb/default.nix2
-rw-r--r--pkgs/development/libraries/libaccounts-glib/default.nix10
-rw-r--r--pkgs/development/libraries/libadwaita/default.nix6
-rw-r--r--pkgs/development/libraries/libdazzle/default.nix3
-rw-r--r--pkgs/development/libraries/libgsf/default.nix8
-rw-r--r--pkgs/development/libraries/libgweather/default.nix19
-rw-r--r--pkgs/development/libraries/libhandy/default.nix8
-rw-r--r--pkgs/development/libraries/liblouis/default.nix4
-rw-r--r--pkgs/development/libraries/libmediaart/default.nix8
-rw-r--r--pkgs/development/libraries/libpeas/default.nix4
-rw-r--r--pkgs/development/libraries/libportal/default.nix4
-rw-r--r--pkgs/development/libraries/pipewire/wireplumber.nix4
-rw-r--r--pkgs/development/python-modules/gst-python/default.nix13
-rw-r--r--pkgs/development/tools/profiling/sysprof/default.nix2
-rw-r--r--pkgs/os-specific/linux/bolt/default.nix8
-rw-r--r--pkgs/os-specific/linux/power-profiles-daemon/default.nix19
-rw-r--r--pkgs/tools/networking/networkmanager/libnma/default.nix5
-rw-r--r--pkgs/tools/package-management/packagekit/default.nix3
-rw-r--r--pkgs/top-level/python-packages.nix4
41 files changed, 187 insertions, 53 deletions
diff --git a/pkgs/applications/networking/browsers/netsurf/libnsgif.nix b/pkgs/applications/networking/browsers/netsurf/libnsgif.nix
index 582bcc84e4f..2e1cb37a646 100644
--- a/pkgs/applications/networking/browsers/netsurf/libnsgif.nix
+++ b/pkgs/applications/networking/browsers/netsurf/libnsgif.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkg-config
+{ lib, stdenv, fetchurl, pkg-config, buildPackages
 , buildsystem
 }:
 
@@ -12,12 +12,15 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-nq6lNM1wtTxar0UxeulXcBaFprSojb407Sb0+q6Hmks=";
   };
 
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ buildsystem ];
 
   makeFlags = [
     "PREFIX=$(out)"
     "NSSHARED=${buildsystem}/share/netsurf-buildsystem"
+    "BUILD_CC=$(CC_FOR_BUILD)"
   ];
 
   meta = with lib; {
diff --git a/pkgs/desktops/gnome/apps/gnome-characters/default.nix b/pkgs/desktops/gnome/apps/gnome-characters/default.nix
index b43e0cdecad..b4e9eee9712 100644
--- a/pkgs/desktops/gnome/apps/gnome-characters/default.nix
+++ b/pkgs/desktops/gnome/apps/gnome-characters/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchurl
+, fetchpatch
 , meson
 , ninja
 , pkg-config
@@ -29,6 +30,13 @@ stdenv.mkDerivation rec {
     sha256 = "XaD/uBb4prRPMDdEyoJ6NAgBGMHJONjXmvF7f+Z5gPg=";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/gnome-characters/-/commit/3e28a6ad668e2239b14f2e05bc477ec1bfb210ba.patch";
+      sha256 = "sha256-2N4eewknhOXBABs6BPA5/YuqZMT8dyXW857iamrrtuA=";
+    })
+  ];
+
   nativeBuildInputs = [
     gettext
     gobject-introspection
diff --git a/pkgs/desktops/gnome/apps/gnome-clocks/default.nix b/pkgs/desktops/gnome/apps/gnome-clocks/default.nix
index 3c57c6272e8..2700f769b08 100644
--- a/pkgs/desktops/gnome/apps/gnome-clocks/default.nix
+++ b/pkgs/desktops/gnome/apps/gnome-clocks/default.nix
@@ -45,6 +45,9 @@ stdenv.mkDerivation rec {
     desktop-file-utils
     libxml2
     gobject-introspection # for finding vapi files
+    # error: Package `...' not found in specified Vala API directories or GObject-Introspection GIR directories
+    # TODO: the vala setuphook should look for vala filess in targetOffset instead of hostOffset
+    gsound
   ];
 
   buildInputs = [
diff --git a/pkgs/desktops/gnome/apps/gnome-logs/default.nix b/pkgs/desktops/gnome/apps/gnome-logs/default.nix
index 16d487867b8..105194123d0 100644
--- a/pkgs/desktops/gnome/apps/gnome-logs/default.nix
+++ b/pkgs/desktops/gnome/apps/gnome-logs/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , lib
 , fetchurl
+, fetchpatch
 , meson
 , ninja
 , pkg-config
@@ -29,6 +30,19 @@ stdenv.mkDerivation rec {
     sha256 = "TV5FFp1r9DkC16npoHk8kW65LaumuoWzXI629nLNq9c=";
   };
 
+  patches = [
+    # meson: Remove redundant check for glib-mkenums
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/gnome-logs/-/commit/01386ce9a69652a00bdb163e569b51150ca8903e.diff";
+      sha256 = "sha256-tJJEai4Jw8aVcyhsFTYILiUV1xhsysX/rleeLP13DVM=";
+    })
+    # meson: remove redundant check for pkg-config
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/gnome-logs/-/commit/ad350729a8b81f2c8eb2122de0956bb2199b48da.patch";
+      sha256 = "sha256-5qGYyKM+B9XNZKytWH8K4QfSuBf7wpaPCWT6YIO5FGY=";
+    })
+  ];
+
   nativeBuildInputs = [
     python3
     meson
@@ -41,6 +55,7 @@ stdenv.mkDerivation rec {
     libxslt
     docbook_xsl
     docbook_xml_dtd_43
+    glib
   ];
 
   buildInputs = [
diff --git a/pkgs/desktops/gnome/apps/gnome-weather/default.nix b/pkgs/desktops/gnome/apps/gnome-weather/default.nix
index b7921322d99..c04cd6f2dc9 100644
--- a/pkgs/desktops/gnome/apps/gnome-weather/default.nix
+++ b/pkgs/desktops/gnome/apps/gnome-weather/default.nix
@@ -31,13 +31,14 @@ stdenv.mkDerivation rec {
     ninja
     wrapGAppsHook
     python3
+    gobject-introspection
+    gjs
   ];
 
   buildInputs = [
     gtk4
     libadwaita
     gjs
-    gobject-introspection
     libgweather
     gnome.adwaita-icon-theme
     geoclue2
diff --git a/pkgs/desktops/gnome/apps/seahorse/default.nix b/pkgs/desktops/gnome/apps/seahorse/default.nix
index 60b1e2d572e..07e39248bb7 100644
--- a/pkgs/desktops/gnome/apps/seahorse/default.nix
+++ b/pkgs/desktops/gnome/apps/seahorse/default.nix
@@ -42,6 +42,13 @@ stdenv.mkDerivation rec {
     itstool
     wrapGAppsHook
     python3
+    openssh
+    gnupg
+    gcr
+    # error: Package `...' not found in specified Vala API directories or GObject-Introspection GIR directories
+    # TODO: the vala setuphook should look for vala filess in targetOffset instead of hostOffset
+    libhandy
+    libsecret
   ];
 
   buildInputs = [
@@ -50,13 +57,11 @@ stdenv.mkDerivation rec {
     glib-networking
     gcr
     gsettings-desktop-schemas
-    gnupg
     gpgme
     libsecret
     avahi
     libsoup
     p11-kit
-    openssh
     openldap
     libpwquality
     libhandy
diff --git a/pkgs/desktops/gnome/core/gdm/default.nix b/pkgs/desktops/gnome/core/gdm/default.nix
index 990f1bef211..cf435b1e9ea 100644
--- a/pkgs/desktops/gnome/core/gdm/default.nix
+++ b/pkgs/desktops/gnome/core/gdm/default.nix
@@ -73,13 +73,13 @@ stdenv.mkDerivation rec {
     pkg-config
     python3
     rsync
+    gobject-introspection
   ];
 
   buildInputs = [
     accountsservice
     audit
     glib
-    gobject-introspection
     gtk3
     keyutils
     libX11
diff --git a/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix b/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix
index 678895ffbb5..8b6eb8c4f1b 100644
--- a/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix
+++ b/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix
@@ -3,6 +3,7 @@
 , fetchurl
 , gnome
 , meson
+, mesonEmulatorHook
 , ninja
 , pkg-config
 , gtk4
@@ -49,6 +50,8 @@ stdenv.mkDerivation rec {
     docbook-xsl-nons
     docbook_xml_dtd_43
     python3
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
diff --git a/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix b/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix
index 397f0b9838f..64eb22b186d 100644
--- a/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix
+++ b/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
     gettext
     wrapGAppsHook4
     libxml2
+    glib
   ];
 
   buildInputs = [
diff --git a/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix b/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix
index 0d8e87b3642..c60e06ea640 100644
--- a/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix
+++ b/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
     # Fixup adapted from export-zips.sh in the source.
 
     extensiondir=$out/share/gnome-shell/extensions
-    schemadir=${glib.makeSchemaPath "$out" "${pname}-${version}"}
+    schemadir=${glib.makeSchemaPath "$out" "$name"}
 
     glib-compile-schemas $schemadir
 
diff --git a/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix b/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix
index aad4744935b..cbce4ad8b05 100644
--- a/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix
+++ b/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix
@@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
     wrapGAppsHook
     meson
     ninja
+    glib
   ];
 
   buildInputs = [
diff --git a/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix b/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix
index 53f775833a8..c7f70c76b2b 100644
--- a/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix
+++ b/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix
@@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
     };
   };
 
-  nativeBuildInputs = [ pkg-config intltool ];
+  nativeBuildInputs = [ pkg-config intltool gtk3 ];
   buildInputs = [ gtk3 librsvg pango atk gtk2 gdk-pixbuf ];
   propagatedBuildInputs = [ gnome.adwaita-icon-theme hicolor-icon-theme ];
 
diff --git a/pkgs/development/libraries/clutter/default.nix b/pkgs/development/libraries/clutter/default.nix
index aacb8581c8f..2bf1162fe19 100644
--- a/pkgs/development/libraries/clutter/default.nix
+++ b/pkgs/development/libraries/clutter/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "dev" ];
 
   buildInputs = [ gtk3 ];
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config gobject-introspection ];
   propagatedBuildInputs =
     [ libX11 libGL libGLU libXext libXfixes libXdamage libXcomposite libXi cogl pango
       atk json-glib gobject-introspection libxcb libinput libgudev libxkbcommon
diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix
index e58a500cf83..7eef53e4c62 100644
--- a/pkgs/development/libraries/cogl/default.nix
+++ b/pkgs/development/libraries/cogl/default.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ pkg-config libintl automake autoconf ];
+  nativeBuildInputs = [ pkg-config libintl automake autoconf gobject-introspection ];
 
   configureFlags = [
     "--enable-introspection"
@@ -41,6 +41,8 @@ stdenv.mkDerivation rec {
   ] ++ lib.optional gstreamerSupport "--enable-cogl-gst"
   ++ lib.optionals (!stdenv.isDarwin) [ "--enable-gles1" "--enable-gles2" ];
 
+  # TODO: this shouldn't propagate so many things
+  # especially not gobject-introspection
   propagatedBuildInputs = with xorg; [
       glib gdk-pixbuf gobject-introspection wayland mesa
       libGL libXrandr libXfixes libXcomposite libXdamage
diff --git a/pkgs/development/libraries/gcr/default.nix b/pkgs/development/libraries/gcr/default.nix
index cb833272923..1241ae2a63f 100644
--- a/pkgs/development/libraries/gcr/default.nix
+++ b/pkgs/development/libraries/gcr/default.nix
@@ -46,10 +46,11 @@ stdenv.mkDerivation rec {
     wrapGAppsHook
     vala
     shared-mime-info
+    gnupg
+    openssh
   ];
 
   buildInputs = [
-    gnupg
     libgcrypt
     libtasn1
     pango
diff --git a/pkgs/development/libraries/geocode-glib/default.nix b/pkgs/development/libraries/geocode-glib/default.nix
index b55b5c19228..e69ea93bb12 100644
--- a/pkgs/development/libraries/geocode-glib/default.nix
+++ b/pkgs/development/libraries/geocode-glib/default.nix
@@ -3,6 +3,7 @@
 , fetchurl
 , fetchpatch
 , meson
+, mesonEmulatorHook
 , ninja
 , pkg-config
 , gettext
@@ -53,6 +54,8 @@ stdenv.mkDerivation rec {
     gtk-doc
     docbook-xsl-nons
     gobject-introspection
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
diff --git a/pkgs/development/libraries/gexiv2/default.nix b/pkgs/development/libraries/gexiv2/default.nix
index 0cf50566004..6c5f797a098 100644
--- a/pkgs/development/libraries/gexiv2/default.nix
+++ b/pkgs/development/libraries/gexiv2/default.nix
@@ -2,6 +2,7 @@
 , lib
 , fetchurl
 , meson
+, mesonEmulatorHook
 , ninja
 , pkg-config
 , exiv2
@@ -35,13 +36,13 @@ stdenv.mkDerivation rec {
     gtk-doc
     docbook-xsl-nons
     docbook_xml_dtd_43
+    (python3.pythonForBuild.withPackages (ps: [ ps.pygobject3 ]))
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
     glib
-    # Python binding overrides
-    python3
-    python3.pkgs.pygobject3
   ];
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix
index c8e28236aa3..e2421159005 100644
--- a/pkgs/development/libraries/gjs/default.nix
+++ b/pkgs/development/libraries/gjs/default.nix
@@ -2,6 +2,7 @@
 , lib
 , stdenv
 , meson
+, mesonEmulatorHook
 , ninja
 , pkg-config
 , gnome
@@ -55,15 +56,17 @@ in stdenv.mkDerivation rec {
     makeWrapper
     which # for locale detection
     libxml2 # for xml-stripblanks
+    dbus # for dbus-run-session
+    gobject-introspection
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
-    gobject-introspection
     cairo
     readline
     libsysprof-capture
     spidermonkey_91
-    dbus # for dbus-run-session
   ];
 
   checkInputs = [
diff --git a/pkgs/development/libraries/gnome-menus/default.nix b/pkgs/development/libraries/gnome-menus/default.nix
index 0b3d6689cb0..498641bbdc3 100644
--- a/pkgs/development/libraries/gnome-menus/default.nix
+++ b/pkgs/development/libraries/gnome-menus/default.nix
@@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
     "INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0"
   ];
 
-  nativeBuildInputs = [ pkg-config gettext ];
-  buildInputs = [ glib gobject-introspection ];
+  nativeBuildInputs = [ pkg-config gettext gobject-introspection ];
+  buildInputs = [ glib ];
 
   passthru = {
     updateScript = gnome.updateScript {
diff --git a/pkgs/development/libraries/grilo/default.nix b/pkgs/development/libraries/grilo/default.nix
index 16897c6f044..2f8c291da0d 100644
--- a/pkgs/development/libraries/grilo/default.nix
+++ b/pkgs/development/libraries/grilo/default.nix
@@ -2,6 +2,7 @@
 , lib
 , fetchurl
 , meson
+, mesonEmulatorHook
 , ninja
 , pkg-config
 , gettext
@@ -47,6 +48,8 @@ stdenv.mkDerivation rec {
     gtk-doc
     docbook-xsl-nons
     docbook_xml_dtd_43
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
diff --git a/pkgs/development/libraries/gspell/default.nix b/pkgs/development/libraries/gspell/default.nix
index d4bd149e64e..9592fd11676 100644
--- a/pkgs/development/libraries/gspell/default.nix
+++ b/pkgs/development/libraries/gspell/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv
+, buildPackages
 , fetchurl
 , pkg-config
 , libxml2
@@ -38,10 +39,10 @@ stdenv.mkDerivation rec {
     libxml2
     autoreconfHook
     gtk-doc
+    glib
   ];
 
   buildInputs = [
-    glib
     gtk3
     icu
   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
@@ -53,6 +54,11 @@ stdenv.mkDerivation rec {
     enchant2
   ];
 
+  configureFlags = [
+    "GLIB_COMPILE_RESOURCES=${lib.getDev buildPackages.glib}/bin/glib-compile-resources"
+    "GLIB_MKENUMS=${lib.getDev buildPackages.glib}/bin/glib-mkenums"
+  ];
+
   passthru = {
     updateScript = gnome.updateScript {
       packageName = pname;
diff --git a/pkgs/development/libraries/gtkmm/3.x.nix b/pkgs/development/libraries/gtkmm/3.x.nix
index 420dee6cbaa..7245b974930 100644
--- a/pkgs/development/libraries/gtkmm/3.x.nix
+++ b/pkgs/development/libraries/gtkmm/3.x.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkg-config, meson, ninja, python3, gtk3, glibmm, cairomm, pangomm, atkmm, libepoxy, gnome }:
+{ lib, stdenv, fetchurl, pkg-config, meson, ninja, python3, gtk3, glibmm, cairomm, pangomm, atkmm, libepoxy, gnome, glib, gdk-pixbuf }:
 
 stdenv.mkDerivation rec {
   pname = "gtkmm";
@@ -11,7 +11,14 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ pkg-config meson ninja python3 ];
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    python3
+    glib
+    gdk-pixbuf # for gdk-pixbuf-pixdata
+  ];
   buildInputs = [ libepoxy ];
 
   propagatedBuildInputs = [ glibmm gtk3 atkmm cairomm pangomm ];
diff --git a/pkgs/development/libraries/gusb/default.nix b/pkgs/development/libraries/gusb/default.nix
index e3dac6c4ec7..af24e46efe2 100644
--- a/pkgs/development/libraries/gusb/default.nix
+++ b/pkgs/development/libraries/gusb/default.nix
@@ -4,7 +4,7 @@
 }:
 
 let
-  pythonEnv = python3.withPackages(ps: with ps; [
+  pythonEnv = python3.pythonForBuild.withPackages(ps: with ps; [
     setuptools
   ]);
 in
diff --git a/pkgs/development/libraries/libaccounts-glib/default.nix b/pkgs/development/libraries/libaccounts-glib/default.nix
index 8dfc222f36a..e20ad1c954d 100644
--- a/pkgs/development/libraries/libaccounts-glib/default.nix
+++ b/pkgs/development/libraries/libaccounts-glib/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitLab, meson, ninja, glib, check, python3, vala, gtk-doc, glibcLocales
+{ lib, stdenv, fetchFromGitLab, meson, mesonEmulatorHook, ninja, glib, check, python3, vala, gtk-doc, glibcLocales
 , libxml2, libxslt, pkg-config, sqlite, docbook_xsl, docbook_xml_dtd_43, gobject-introspection }:
 
 stdenv.mkDerivation rec {
@@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
     ninja
     pkg-config
     vala
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
@@ -38,6 +40,12 @@ stdenv.mkDerivation rec {
     sqlite
   ];
 
+  # TODO: send patch upstream to make running tests optional
+  postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+    substituteInPlace meson.build \
+      --replace "subdir('tests')" ""
+  '';
+
   LC_ALL = "en_US.UTF-8";
 
   mesonFlags = [
diff --git a/pkgs/development/libraries/libadwaita/default.nix b/pkgs/development/libraries/libadwaita/default.nix
index a9185f0b4fe..862ecda2697 100644
--- a/pkgs/development/libraries/libadwaita/default.nix
+++ b/pkgs/development/libraries/libadwaita/default.nix
@@ -33,6 +33,10 @@ stdenv.mkDerivation rec {
     hash = "sha256-xxnLgPKPOND/ITvDC6SOD2GlkzlIX3BzBbt6p2AEjgY=";
   };
 
+  depsBuildBuild = [
+    pkg-config
+  ];
+
   nativeBuildInputs = [
     gi-docgen
     meson
@@ -40,6 +44,7 @@ stdenv.mkDerivation rec {
     pkg-config
     sassc
     vala
+    gobject-introspection
   ];
 
   mesonFlags = [
@@ -50,7 +55,6 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     fribidi
-    gobject-introspection
   ] ++ lib.optionals stdenv.isDarwin [
     AppKit
     Foundation
diff --git a/pkgs/development/libraries/libdazzle/default.nix b/pkgs/development/libraries/libdazzle/default.nix
index 22ef87e43d0..aa808d5b4aa 100644
--- a/pkgs/development/libraries/libdazzle/default.nix
+++ b/pkgs/development/libraries/libdazzle/default.nix
@@ -3,6 +3,7 @@
 , fetchurl
 , ninja
 , meson
+, mesonEmulatorHook
 , pkg-config
 , vala
 , gobject-introspection
@@ -43,6 +44,8 @@ stdenv.mkDerivation rec {
     glib
   ] ++ lib.optionals stdenv.isLinux [
     xvfb-run
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
diff --git a/pkgs/development/libraries/libgsf/default.nix b/pkgs/development/libraries/libgsf/default.nix
index 30324b04d85..6897ed5a097 100644
--- a/pkgs/development/libraries/libgsf/default.nix
+++ b/pkgs/development/libraries/libgsf/default.nix
@@ -55,6 +55,14 @@ stdenv.mkDerivation rec {
     patchShebangs ./tests/
   '';
 
+  # checking pkg-config is at least version 0.9.0... ./configure: line 15213: no: command not found
+  # configure: error: in `/build/libgsf-1.14.50':
+  # configure: error: The pkg-config script could not be found or is too old.  Make sure it
+  # is in your PATH or set the PKG_CONFIG environment variable to the full
+  preConfigure = ''
+    export PKG_CONFIG="$(command -v "$PKG_CONFIG")"
+  '';
+
   passthru = {
     updateScript = gnome.updateScript {
       packageName = pname;
diff --git a/pkgs/development/libraries/libgweather/default.nix b/pkgs/development/libraries/libgweather/default.nix
index cae2095f8eb..e9a4eb2a4ea 100644
--- a/pkgs/development/libraries/libgweather/default.nix
+++ b/pkgs/development/libraries/libgweather/default.nix
@@ -35,6 +35,10 @@ stdenv.mkDerivation rec {
     ./fix-pkgconfig.patch
   ];
 
+  depsBuildBuild = [
+    pkg-config
+  ];
+
   nativeBuildInputs = [
     meson
     ninja
@@ -43,8 +47,7 @@ stdenv.mkDerivation rec {
     vala
     gi-docgen
     gobject-introspection
-    python3
-    python3.pkgs.pygobject3
+    (python3.pythonForBuild.withPackages (ps: [ ps.pygobject3 ]))
   ];
 
   buildInputs = [
@@ -63,6 +66,18 @@ stdenv.mkDerivation rec {
   postPatch = ''
     patchShebangs build-aux/meson/meson_post_install.py
     patchShebangs build-aux/meson/gen_locations_variant.py
+
+    # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
+    # it should be a build-time dep for build
+    # TODO: send upstream
+    substituteInPlace doc/meson.build \
+      --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver" \
+      --replace "'gi-docgen', req" "'gi-docgen', native:true, req"
+
+    # gir works for us even when cross-compiling
+    # TODO: send upstream because downstream users can use the option to disable gir if they don't have it working
+    substituteInPlace libgweather/meson.build \
+      --replace "g_ir_scanner.found() and not meson.is_cross_build()" "g_ir_scanner.found()"
   '';
 
   postFixup = ''
diff --git a/pkgs/development/libraries/libhandy/default.nix b/pkgs/development/libraries/libhandy/default.nix
index 468062beaef..58d9097d837 100644
--- a/pkgs/development/libraries/libhandy/default.nix
+++ b/pkgs/development/libraries/libhandy/default.nix
@@ -31,7 +31,6 @@ stdenv.mkDerivation rec {
   outputs = [
     "out"
     "dev"
-  ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
     "devdoc"
   ] ++ lib.optionals enableGlade [
     "glade"
@@ -43,6 +42,10 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-R3iL01gE69M8sJkR6XU0TIQ1ngttlSCv0cgh66i6d/8=";
   };
 
+  depsBuildBuild = [
+    pkg-config
+  ];
+
   nativeBuildInputs = [
     gobject-introspection
     gi-docgen
@@ -70,9 +73,8 @@ stdenv.mkDerivation rec {
   ];
 
   mesonFlags = [
-    "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
+    "-Dgtk_doc=true"
     "-Dglade_catalog=${if enableGlade then "enabled" else "disabled"}"
-    "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
   ];
 
   # Uses define_variable in pkg-config, but we still need it to use the glade output
diff --git a/pkgs/development/libraries/liblouis/default.nix b/pkgs/development/libraries/liblouis/default.nix
index 32e58c9be0b..2f3093e2fac 100644
--- a/pkgs/development/libraries/liblouis/default.nix
+++ b/pkgs/development/libraries/liblouis/default.nix
@@ -15,7 +15,9 @@ stdenv.mkDerivation rec {
   pname = "liblouis";
   version = "3.22.0";
 
-  outputs = [ "out" "dev" "man" "info" "doc" ];
+  outputs = [ "out" "dev" "info" "doc" ]
+    # configure: WARNING: cannot generate manual pages while cross compiling
+    ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "man" ];
 
   src = fetchFromGitHub {
     owner = "liblouis";
diff --git a/pkgs/development/libraries/libmediaart/default.nix b/pkgs/development/libraries/libmediaart/default.nix
index 531ff8584fa..e8898698dca 100644
--- a/pkgs/development/libraries/libmediaart/default.nix
+++ b/pkgs/development/libraries/libmediaart/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, meson, ninja, pkg-config, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gdk-pixbuf, gobject-introspection, gnome }:
+{ lib, stdenv, fetchurl, meson, mesonEmulatorHook, ninja, pkg-config, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gdk-pixbuf, gobject-introspection, gnome }:
 
 stdenv.mkDerivation rec {
   pname = "libmediaart";
@@ -11,7 +11,11 @@ stdenv.mkDerivation rec {
     sha256 = "w7xQJdfbOAWH+cjrgAxhH2taFta0t4/P+T9ih2pnfxc=";
   };
 
-  nativeBuildInputs = [ meson ninja pkg-config vala gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ];
+  nativeBuildInputs = [ meson ninja pkg-config vala gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ]
+    ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
   buildInputs = [ glib gdk-pixbuf ];
 
   mesonFlags = [
diff --git a/pkgs/development/libraries/libpeas/default.nix b/pkgs/development/libraries/libpeas/default.nix
index 712592431ab..95e56153e51 100644
--- a/pkgs/development/libraries/libpeas/default.nix
+++ b/pkgs/development/libraries/libpeas/default.nix
@@ -25,6 +25,10 @@ stdenv.mkDerivation rec {
     sha256 = "1iVSD6AuiXcCmyRq5Dm8IYloll8egtYSIItxPx3MPQ4=";
   };
 
+  depsBuildBuild = [
+    pkg-config
+  ];
+
   nativeBuildInputs = [
     pkg-config
     meson
diff --git a/pkgs/development/libraries/libportal/default.nix b/pkgs/development/libraries/libportal/default.nix
index 93ca52c243c..005bc212665 100644
--- a/pkgs/development/libraries/libportal/default.nix
+++ b/pkgs/development/libraries/libportal/default.nix
@@ -40,6 +40,10 @@ stdenv.mkDerivation rec {
     })
   ];
 
+  depsBuildBuild = [
+    pkg-config
+  ];
+
   nativeBuildInputs = [
     meson
     ninja
diff --git a/pkgs/development/libraries/pipewire/wireplumber.nix b/pkgs/development/libraries/pipewire/wireplumber.nix
index 5f418efe9fa..d43a4331f98 100644
--- a/pkgs/development/libraries/pipewire/wireplumber.nix
+++ b/pkgs/development/libraries/pipewire/wireplumber.nix
@@ -20,7 +20,7 @@
 , pipewire
 , # options
   enableDocs ? true
-, enableGI ? stdenv.hostPlatform == stdenv.buildPlatform
+, enableGI ? true
 }:
 let
   mesonEnableFeature = b: if b then "enabled" else "disabled";
@@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
     gobject-introspection
   ] ++ lib.optionals (enableDocs || enableGI) [
     doxygen
-    (python3.withPackages (ps: with ps;
+    (python3.pythonForBuild.withPackages (ps: with ps;
     lib.optionals enableDocs [ sphinx sphinx-rtd-theme breathe ] ++
       lib.optionals enableGI [ lxml ]
     ))
diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix
index e14223c1fd6..52c7be56bc7 100644
--- a/pkgs/development/python-modules/gst-python/default.nix
+++ b/pkgs/development/python-modules/gst-python/default.nix
@@ -8,7 +8,7 @@
 , python
 , pygobject3
 , gobject-introspection
-, gst-plugins-base
+, gst_all_1
 , isPy3k
 }:
 
@@ -28,22 +28,27 @@ buildPythonPackage rec {
   # Python 2.x is not supported.
   disabled = !isPy3k;
 
+  depsBuildBuild = [
+    pkg-config
+  ];
+
   nativeBuildInputs = [
     meson
     ninja
     pkg-config
-    python
     gobject-introspection
-    gst-plugins-base
+    gst_all_1.gst-plugins-base
   ];
 
   propagatedBuildInputs = [
-    gst-plugins-base
+    gst_all_1.gst-plugins-base
     pygobject3
   ];
 
   mesonFlags = [
     "-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides"
+    # Exec format error during configure
+    "-Dpython=${python.pythonForBuild.interpreter}"
   ];
 
   doCheck = true;
diff --git a/pkgs/development/tools/profiling/sysprof/default.nix b/pkgs/development/tools/profiling/sysprof/default.nix
index e21e7190786..118b55197da 100644
--- a/pkgs/development/tools/profiling/sysprof/default.nix
+++ b/pkgs/development/tools/profiling/sysprof/default.nix
@@ -43,10 +43,10 @@ stdenv.mkDerivation rec {
     shared-mime-info
     wrapGAppsHook
     gnome.adwaita-icon-theme
+    glib
   ];
 
   buildInputs = [
-    glib
     gtk3
     json-glib
     pango
diff --git a/pkgs/os-specific/linux/bolt/default.nix b/pkgs/os-specific/linux/bolt/default.nix
index d424f89fdfb..2545c73ac58 100644
--- a/pkgs/os-specific/linux/bolt/default.nix
+++ b/pkgs/os-specific/linux/bolt/default.nix
@@ -44,6 +44,10 @@ stdenv.mkDerivation rec {
     })
   ];
 
+  depsBuildBuild = [
+    pkg-config
+  ];
+
   nativeBuildInputs = [
     asciidoc
     docbook_xml_dtd_45
@@ -53,10 +57,10 @@ stdenv.mkDerivation rec {
     meson
     ninja
     pkg-config
+    glib
   ] ++ lib.optional (!doCheck) python3;
 
   buildInputs = [
-    glib
     polkit
     systemd
   ];
@@ -71,7 +75,7 @@ stdenv.mkDerivation rec {
     dbus
     gobject-introspection
     umockdev
-    (python3.withPackages
+    (python3.pythonForBuild.withPackages
       (p: [ p.pygobject3 p.dbus-python p.python-dbusmock ]))
   ];
 
diff --git a/pkgs/os-specific/linux/power-profiles-daemon/default.nix b/pkgs/os-specific/linux/power-profiles-daemon/default.nix
index 402b2536163..f2720f40f5d 100644
--- a/pkgs/os-specific/linux/power-profiles-daemon/default.nix
+++ b/pkgs/os-specific/linux/power-profiles-daemon/default.nix
@@ -2,6 +2,7 @@
 , lib
 , pkg-config
 , meson
+, mesonEmulatorHook
 , ninja
 , fetchFromGitLab
 , fetchpatch
@@ -24,13 +25,6 @@
 , nixosTests
 }:
 
-let
-  testPythonPkgs = ps: with ps; [
-    pygobject3
-    dbus-python
-    python-dbusmock
-  ];
-in
 stdenv.mkDerivation rec {
   pname = "power-profiles-daemon";
   version = "0.12";
@@ -58,6 +52,14 @@ stdenv.mkDerivation rec {
     gobject-introspection
     wrapGAppsNoGuiHook
     python3.pkgs.wrapPython
+    # checkInput but cheked for during the configuring
+    (python3.pythonForBuild.withPackages (ps: with ps; [
+      pygobject3
+      dbus-python
+      python-dbusmock
+    ]))
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
@@ -81,13 +83,12 @@ stdenv.mkDerivation rec {
   checkInputs = [
     umockdev
     dbus
-    (python3.withPackages testPythonPkgs)
   ];
 
   mesonFlags = [
     "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
     "-Dgtk_doc=true"
-    "-Dtests=true"
+    "-Dtests=${lib.boolToString (stdenv.buildPlatform.canExecute stdenv.hostPlatform)}"
   ];
 
   doCheck = true;
diff --git a/pkgs/tools/networking/networkmanager/libnma/default.nix b/pkgs/tools/networking/networkmanager/libnma/default.nix
index 4993068d2a5..00e68176c10 100644
--- a/pkgs/tools/networking/networkmanager/libnma/default.nix
+++ b/pkgs/tools/networking/networkmanager/libnma/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , fetchurl
 , meson
+, mesonEmulatorHook
 , ninja
 , gettext
 , gtk-doc
@@ -51,6 +52,8 @@ stdenv.mkDerivation rec {
     docbook_xml_dtd_43
     libxml2
     vala
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
@@ -72,7 +75,7 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     substituteInPlace src/nma-ws/nma-eap.c --subst-var-by \
-      NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$out" "${pname}-${version}"}
+      NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$out" "$name"}
   '';
 
   postInstall = ''
diff --git a/pkgs/tools/package-management/packagekit/default.nix b/pkgs/tools/package-management/packagekit/default.nix
index 66064139f38..0dfa433e6c4 100644
--- a/pkgs/tools/package-management/packagekit/default.nix
+++ b/pkgs/tools/package-management/packagekit/default.nix
@@ -44,7 +44,6 @@ stdenv.mkDerivation rec {
     glib
     polkit
     python3
-    gobject-introspection
     gst_all_1.gstreamer
     gst_all_1.gst-plugins-base
     gtk3
@@ -54,6 +53,8 @@ stdenv.mkDerivation rec {
   ] ++ lib.optional enableSystemd systemd
   ++ lib.optional enableBashCompletion bash-completion;
   nativeBuildInputs = [
+    gobject-introspection
+    glib
     vala
     gettext
     pkg-config
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index e0117f946f7..f33700146e8 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4010,8 +4010,8 @@ in {
   };
 
   gst-python = callPackage ../development/python-modules/gst-python {
-    inherit (pkgs) meson;
-    inherit (pkgs.gst_all_1) gst-plugins-base;
+    # inherit (pkgs) meson won't work because it won't be spliced
+    inherit (pkgs.buildPackages) meson;
   };
 
   gtfs-realtime-bindings = callPackage ../development/python-modules/gtfs-realtime-bindings { };