diff --git a/pkgs/development/libraries/litehtml/default.nix b/pkgs/development/libraries/litehtml/default.nix
index 6e3db75f5eb..3927f7cce4a 100644
--- a/pkgs/development/libraries/litehtml/default.nix
+++ b/pkgs/development/libraries/litehtml/default.nix
@@ -16,6 +16,14 @@ stdenv.mkDerivation rec {
hash = "sha256-9571d3k8RkzEpMWPuIejZ7njLmYstSwFUaSqT3sk6uQ=";
};
+ # Don't search for non-existant gumbo cmake config
+ # This will mislead cmake that litehtml is not found
+ # Affects build of pkgs that depend on litehtml
+ postPatch = ''
+ substituteInPlace cmake/litehtmlConfig.cmake \
+ --replace "find_dependency(gumbo)" ""
+ '';
+
nativeBuildInputs = [
cmake
];