From 2231d4882472033c2f7a2042531af3e82421b6a8 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 7 Apr 2023 03:29:47 +0000 Subject: [PATCH] librest (0.8): don't build docs when cross compiling librest_1_0 supports cross compilation (in staging: https://github.com/NixOS/nixpkgs/pull/223142), but the old 0.8 version still doesn't. unlike 1.0 -- which builds with meson -- librest 0.8 uses autotools with no obvious way to tell `configure` to use the native gtk-doc, so just skip docs for cross builds of this older version. --- pkgs/development/libraries/librest/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/librest/default.nix b/pkgs/development/libraries/librest/default.nix index abe53ff3692f..19f7ced5986f 100644 --- a/pkgs/development/libraries/librest/default.nix +++ b/pkgs/development/libraries/librest/default.nix @@ -26,6 +26,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config gobject-introspection + ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ gtk-doc docbook-xsl-nons docbook_xml_dtd_412 @@ -38,7 +39,7 @@ stdenv.mkDerivation rec { ]; configureFlags = [ - "--enable-gtk-doc" + (lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "gtk-doc") # Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged. "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt" ];