@@ -13,11 +13,17 @@ stdenv.mkDerivation rec {
1313
1414 outputs = [ "out" "dev" ];
1515 nativeBuildInputs = [ pkgconfig ];
16− buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
16+ buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
1717 ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
1818 libiconv ApplicationServices
1919 ]);
2020
21+ # '@LIBPNG_LDFLAGS@' is no longer substituted by autoconf (the code is commented out)
22+ # so we need to remove it from the pkg-config file as well
23+ preConfigure = ''
24+ substituteInPlace config/pstoedit.pc.in --replace '@LIBPNG_LDFLAGS@' ""
25+ '';
26+
2127 meta = with stdenv.lib; {
2228 description = "Translates PostScript and PDF graphics into other vector formats";
2329 homepage = https://sourceforge.net/projects/pstoedit/;