2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake, pkg-config, zlib, libpng, libjpeg, giflib, libtiff
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pslib";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.4.8";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "${pname}-snixource-${version}.tar.gz";
|
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
2024-09-19 14:19:46 +00:00
|
|
|
sha256 = "sha256-gaWNvBLuUUy0o+HWCOyG6KmzxDrYCY6PV3WbA/jjH64=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ zlib libpng libjpeg giflib libtiff ];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
env = lib.optionalAttrs stdenv.isDarwin {
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
|
|
|
};
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib
|
2024-04-21 15:54:59 +00:00
|
|
|
for path in *.dylib *.so *.so.* *.o *.o.*; do
|
2021-01-05 17:05:55 +00:00
|
|
|
mv $path $out/lib/
|
|
|
|
done
|
|
|
|
mkdir -p $dev/include
|
|
|
|
mv ../include/libps $dev/include
|
|
|
|
if test -d nix-support; then
|
|
|
|
mv nix-support $dev
|
|
|
|
fi
|
|
|
|
mkdir -p $doc/share/doc/${pname}
|
|
|
|
cp -r ../doc/. $doc/share/doc/${pname}
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "C-library for generating multi page PostScript documents";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://pslib.sourceforge.net/";
|
2021-01-05 17:05:55 +00:00
|
|
|
changelog =
|
|
|
|
"https://sourceforge.net/p/pslib/git/ci/master/tree/pslib/ChangeLog";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ ShamrockLee ];
|
2024-04-21 15:54:59 +00:00
|
|
|
platforms = platforms.unix;
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
}
|