Unverified Commit 7fe9eca3 authored by Randy Eckenrode's avatar Randy Eckenrode
Browse files

phpExtensions.iconv: fix build on Darwin after the SDK update

PHP’s m4 macros assume that the libiconv shared library can be found at
the same base path as its headers, but that’s not the case on Darwin.
Its libiconv has separate outputs.
parent f63d9984
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -451,6 +451,9 @@ in {
          name = "iconv";
          buildInputs = [ libiconv ];
          configureFlags = [ "--with-iconv" ];
          # Some other extensions support separate libdirs, but iconv does not. This causes problems with detecting
          # Darwin’s libiconv because it has separate outputs. Adding `-liconv` works around the issue.
          env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_LDFLAGS = "-liconv"; };
          doCheck = stdenv.hostPlatform.isLinux;
        }
        {