1 { stdenv, fetchurl, pkg-config, darwin, lib
2 , zlib, ghostscript, imagemagick, plotutils, gd
3 , libjpeg, libwebp, libiconv
6 stdenv.mkDerivation rec {
11 url = "mirror://sourceforge/pstoedit/pstoedit-${version}.tar.gz";
12 sha256 = "sha256-jMKONLx/iNkTeA+AdOgT3VqqCsIFams21L8ASg6Q2AE=";
16 # Turn on "-rdb" option (REALLYDELAYBIND) by default to ensure compatibility with gs-9.22
18 patches = [ ./pstoedit-gs-9.22-compat.patch ];
20 outputs = [ "out" "dev" ];
21 nativeBuildInputs = [ pkg-config ];
22 buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
23 ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
24 libiconv ApplicationServices
27 # '@LIBPNG_LDFLAGS@' is no longer substituted by autoconf (the code is commented out)
28 # so we need to remove it from the pkg-config file as well
30 substituteInPlace config/pstoedit.pc.in --replace '@LIBPNG_LDFLAGS@' ""
34 description = "Translates PostScript and PDF graphics into other vector formats";
35 homepage = "https://sourceforge.net/projects/pstoedit/";
36 license = licenses.gpl2Plus;
37 maintainers = [ maintainers.marcweber ];
38 platforms = platforms.unix;
39 mainProgram = "pstoedit";