nixpkgs/pkgs/by-name/ps/pstoedit/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkg-config, darwin, lib
, zlib, ghostscript, imagemagick, plotutils, gd
2024-09-10 15:24:26 +00:00
, libjpeg, libwebp, libiconv, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "pstoedit";
2024-09-10 15:24:26 +00:00
version = "4.01";
src = fetchurl {
url = "mirror://sourceforge/pstoedit/pstoedit-${version}.tar.gz";
2024-09-10 15:24:26 +00:00
hash = "sha256-RZdlq3NssQ+VVKesAsXqfzVcbC6fz9IXYRx9UQKxB2s=";
};
outputs = [ "out" "dev" ];
2024-09-10 15:24:26 +00:00
nativeBuildInputs = [ makeWrapper pkg-config ];
2017-06-30 14:27:12 +00:00
buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
libiconv ApplicationServices
]);
2017-06-30 14:27:12 +00:00
# '@LIBPNG_LDFLAGS@' is no longer substituted by autoconf (the code is commented out)
# so we need to remove it from the pkg-config file as well
preConfigure = ''
substituteInPlace config/pstoedit.pc.in --replace '@LIBPNG_LDFLAGS@' ""
'';
2024-09-10 15:24:26 +00:00
postInstall = ''
wrapProgram $out/bin/pstoedit \
--prefix PATH : ${lib.makeBinPath [ ghostscript ]}
'';
meta = with lib; {
description = "Translates PostScript and PDF graphics into other vector formats";
homepage = "https://sourceforge.net/projects/pstoedit/";
2024-04-26 11:35:31 +00:00
license = licenses.gpl2Plus;
maintainers = [ maintainers.marcweber ];
platforms = platforms.unix;
2023-11-23 02:51:17 +00:00
mainProgram = "pstoedit";
};
}