mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 06:33:42 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{ stdenv, fetchurl, pkgconfig, darwin, lib
|
|
, zlib, ghostscript, imagemagick, plotutils, gd
|
|
, libjpeg, libwebp, libiconv
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "pstoedit-3.75";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/pstoedit/${name}.tar.gz";
|
|
sha256 = "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp";
|
|
};
|
|
|
|
#
|
|
# Turn on "-rdb" option (REALLYDELAYBIND) by default to ensure compatibility with gs-9.22
|
|
#
|
|
patches = [ ./pstoedit-gs-9.22-compat.patch ];
|
|
|
|
outputs = [ "out" "dev" ];
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
|
|
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
libiconv ApplicationServices
|
|
]);
|
|
|
|
# '@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@' ""
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Translates PostScript and PDF graphics into other vector formats";
|
|
homepage = "https://sourceforge.net/projects/pstoedit/";
|
|
license = licenses.gpl2;
|
|
maintainers = [ maintainers.marcweber ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|