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.
This commit is contained in:
Colin 2023-04-07 03:29:47 +00:00
parent c82580fd11
commit 2231d48824

View file

@ -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"
];