summary refs log tree commit diff
path: root/pkgs/development/libraries/libgweather/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libgweather/default.nix')
-rw-r--r--pkgs/development/libraries/libgweather/default.nix19
1 files changed, 17 insertions, 2 deletions
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 = ''