1 { stdenv, fetchurl, pkg-config, darwin, lib
2 , zlib, ghostscript, imagemagick, plotutils, gd
3 , libjpeg, libwebp, libiconv, makeWrapper
6 stdenv.mkDerivation rec {
11 url = "mirror://sourceforge/pstoedit/pstoedit-${version}.tar.gz";
12 hash = "sha256-RZdlq3NssQ+VVKesAsXqfzVcbC6fz9IXYRx9UQKxB2s=";
15 outputs = [ "out" "dev" ];
16 nativeBuildInputs = [ makeWrapper pkg-config ];
17 buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
18 ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
19 libiconv ApplicationServices
22 # '@LIBPNG_LDFLAGS@' is no longer substituted by autoconf (the code is commented out)
23 # so we need to remove it from the pkg-config file as well
25 substituteInPlace config/pstoedit.pc.in --replace '@LIBPNG_LDFLAGS@' ""
29 wrapProgram $out/bin/pstoedit \
30 --prefix PATH : ${lib.makeBinPath [ ghostscript ]}
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";