summary refs log tree commit diff
diff options
context:
space:
mode:
authorColin <colin@uninsane.org>2023-04-07 03:29:47 +0000
committerColin <colin@uninsane.org>2023-04-07 03:29:47 +0000
commit2231d4882472033c2f7a2042531af3e82421b6a8 (patch)
tree0a17eead4765723f8f678ba357256405774e7770
parentc82580fd11955f020104fc839da032534a582e1e (diff)
downloadnixpkgs-2231d4882472033c2f7a2042531af3e82421b6a8.tar
nixpkgs-2231d4882472033c2f7a2042531af3e82421b6a8.tar.gz
nixpkgs-2231d4882472033c2f7a2042531af3e82421b6a8.tar.bz2
nixpkgs-2231d4882472033c2f7a2042531af3e82421b6a8.tar.lz
nixpkgs-2231d4882472033c2f7a2042531af3e82421b6a8.tar.xz
nixpkgs-2231d4882472033c2f7a2042531af3e82421b6a8.tar.zst
nixpkgs-2231d4882472033c2f7a2042531af3e82421b6a8.zip
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.
-rw-r--r--pkgs/development/libraries/librest/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/libraries/librest/default.nix b/pkgs/development/libraries/librest/default.nix
index abe53ff3692..19f7ced5986 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"
   ];