lol

glib: fix docs cross compilation (again)

Do not depend on host gtk-doc when cross compiling (we do not use it
there), and document why we need a host gtk-doc in the first place.

authored by

Pierre Bourdon and committed by
Milan
e432e78d 25343142

+12 -2
+12 -2
pkgs/development/libraries/glib/default.nix
··· 92 92 buildInputs = [ 93 93 libelf setupHook pcre 94 94 bash gnum4 # install glib-gettextize and m4 macros for other apps to use 95 - gtk-doc 96 95 ] ++ optionals stdenv.isLinux [ 97 96 libselinux 98 97 util-linuxMinimal # for libmount 99 98 ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ 100 99 AppKit Carbon Cocoa CoreFoundation CoreServices Foundation 101 - ]); 100 + ]) ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ 101 + # Note: this needs to be both in buildInputs and nativeBuildInputs. The 102 + # Meson gtkdoc module uses find_program to look it up (-> build dep), but 103 + # glib's own Meson configuration uses the host pkg-config to find its 104 + # version (-> host dep). We could technically go and fix this in glib, add 105 + # pkg-config to depsBuildBuild, but this would be a futile exercise since 106 + # Meson's gtkdoc integration does not support cross compilation[1] anyway 107 + # and this derivation disables the docs build when cross compiling. 108 + # 109 + # [1] https://github.com/mesonbuild/meson/issues/2003 110 + gtk-doc 111 + ]; 102 112 103 113 strictDeps = true; 104 114