From 491ecfdf4673ade98e1a1370000af9b684162d39 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Fri, 6 Dec 2024 20:40:04 -0800 Subject: [PATCH] libpng12: fix clang-19 build clang-19 defines TARGET_OS_MACOS which results in libpng erroneously trying to include `fp.h` rather than `math.h`. --- pkgs/development/libraries/libpng/12.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/libpng/12.nix b/pkgs/development/libraries/libpng/12.nix index 9792447bcc888c..46fe96aa0777a0 100644 --- a/pkgs/development/libraries/libpng/12.nix +++ b/pkgs/development/libraries/libpng/12.nix @@ -13,6 +13,10 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl"; }; + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace pngconf.h --replace-fail '' '' + ''; + outputs = [ "out" "dev" "man" ]; propagatedBuildInputs = [ zlib ];