mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-03 19:43:30 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
42 lines
1.3 KiB
Nix
42 lines
1.3 KiB
Nix
{ stdenv, fetchurl, pkg-config, darwin, lib
|
|
, zlib, ghostscript, imagemagick, plotutils, gd
|
|
, libjpeg, libwebp, libiconv, makeWrapper
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pstoedit";
|
|
version = "4.01";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/pstoedit/pstoedit-${version}.tar.gz";
|
|
hash = "sha256-RZdlq3NssQ+VVKesAsXqfzVcbC6fz9IXYRx9UQKxB2s=";
|
|
};
|
|
|
|
outputs = [ "out" "dev" ];
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
|
buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
|
|
++ lib.optionals stdenv.hostPlatform.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@' ""
|
|
'';
|
|
|
|
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";
|
|
};
|
|
}
|