Files
nixpkgs/pkgs/by-name/ps/pstoedit/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.3 KiB
Nix

{
stdenv,
fetchurl,
pkg-config,
lib,
zlib,
ghostscript,
imagemagick,
plotutils,
gd,
libjpeg,
libwebp,
libiconv,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "pstoedit";
version = "4.02";
src = fetchurl {
url = "mirror://sourceforge/pstoedit/pstoedit-${version}.tar.gz";
hash = "sha256-VYi0MtLGsq2YKLRJFepYE/+aOjMSpB+g3kw43ayd9y8=";
};
postPatch = ''
# don't use gnu-isms like link.h on macos
substituteInPlace src/pstoedit.cpp --replace-fail '#ifndef _MSC_VER' '#if !defined(_MSC_VER) && !defined(__APPLE__)'
'';
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
zlib
ghostscript
imagemagick
plotutils
gd
libjpeg
libwebp
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
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/";
license = licenses.gpl2Plus;
maintainers = [ maintainers.marcweber ];
platforms = platforms.unix;
mainProgram = "pstoedit";
};
}