diff options
author | Pierre Bourdon <delroth@gmail.com> | 2021-04-17 14:33:00 +0200 |
---|---|---|
committer | Milan <milan@petabyte.dev> | 2021-04-17 15:26:18 +0200 |
commit | e432e78d1cbe08a00ff1c2ea4dc05cedcc842627 (patch) | |
tree | 0d452221edf04ac2b6909b900c1095e851d40282 /pkgs/development/libraries/glib | |
parent | 2534314225ee8bf23717da6ec84d79c1c880aeec (diff) |
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.
Diffstat (limited to 'pkgs/development/libraries/glib')
-rw-r--r-- | pkgs/development/libraries/glib/default.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index ce64bef95adba..fccd6ddb04176 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -92,13 +92,23 @@ stdenv.mkDerivation rec { buildInputs = [ libelf setupHook pcre bash gnum4 # install glib-gettextize and m4 macros for other apps to use - gtk-doc ] ++ optionals stdenv.isLinux [ libselinux util-linuxMinimal # for libmount ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Carbon Cocoa CoreFoundation CoreServices Foundation - ]); + ]) ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ + # Note: this needs to be both in buildInputs and nativeBuildInputs. The + # Meson gtkdoc module uses find_program to look it up (-> build dep), but + # glib's own Meson configuration uses the host pkg-config to find its + # version (-> host dep). We could technically go and fix this in glib, add + # pkg-config to depsBuildBuild, but this would be a futile exercise since + # Meson's gtkdoc integration does not support cross compilation[1] anyway + # and this derivation disables the docs build when cross compiling. + # + # [1] https://github.com/mesonbuild/meson/issues/2003 + gtk-doc + ]; strictDeps = true; |