From f2c733a28bdd51a91ca6067b19fd40112d9915f3 Mon Sep 17 00:00:00 2001 From: FliegendeWurst Date: Wed, 15 Jan 2025 15:37:40 +0100 Subject: [PATCH] librest: fix strictDeps build --- pkgs/development/libraries/librest/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/librest/default.nix b/pkgs/development/libraries/librest/default.nix index c932f59d0d12..4bbceccda505 100644 --- a/pkgs/development/libraries/librest/default.nix +++ b/pkgs/development/libraries/librest/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { pkg-config gobject-introspection ] - ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ + ++ lib.optionals (stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ gtk-doc docbook-xsl-nons docbook_xml_dtd_412 @@ -45,12 +45,20 @@ stdenv.mkDerivation rec { libxml2 ]; + strictDeps = true; + configureFlags = [ - (lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "gtk-doc") + (lib.enableFeature (stdenv.buildPlatform.canExecute stdenv.hostPlatform) "gtk-doc") # Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged. "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt" ]; + postPatch = '' + # pkg-config doesn't look in $PATH if strictDeps is on + substituteInPlace ./configure \ + --replace-fail 'have_gtk_doc=no' "echo gtk-doc is present" + ''; + passthru = { updateScript = gnome.updateScript { packageName = pname;