2021-06-30 02:19:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, zlib
|
|
|
|
, libX11
|
|
|
|
, libpng
|
2021-06-30 03:03:07 +00:00
|
|
|
, gd
|
|
|
|
, freetype
|
2021-06-30 02:19:12 +00:00
|
|
|
}:
|
2006-08-23 16:09:03 +00:00
|
|
|
|
2021-06-30 02:53:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-06-30 02:19:12 +00:00
|
|
|
pname = "ploticus";
|
|
|
|
version = "2.42";
|
2006-08-23 16:09:03 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-30 02:53:01 +00:00
|
|
|
url = "mirror://sourceforge/ploticus/ploticus/${version}/ploticus${lib.replaceStrings [ "." ] [ "" ] version}_src.tar.gz";
|
|
|
|
sha256 = "PynkufQFIDqT7+yQDlgW2eG0OBghiB4kHAjKt91m4LA=";
|
2006-08-23 16:09:03 +00:00
|
|
|
};
|
|
|
|
|
2021-06-30 02:19:12 +00:00
|
|
|
patches = [
|
|
|
|
# Replace hardcoded FHS path with $out.
|
|
|
|
./ploticus-install.patch
|
|
|
|
|
|
|
|
# Set the location of the PREFABS directory.
|
|
|
|
./set-prefabs-dir.patch
|
2021-06-30 03:03:07 +00:00
|
|
|
|
|
|
|
# Use gd from Nixpkgs instead of the vendored one.
|
|
|
|
# This is required for non-ASCII fonts to work:
|
|
|
|
# http://ploticus.sourceforge.net/doc/fonts.html
|
|
|
|
./use-gd-package.patch
|
2021-06-30 02:19:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
libX11
|
|
|
|
libpng
|
2021-06-30 03:03:07 +00:00
|
|
|
gd
|
|
|
|
freetype
|
2021-06-30 02:19:12 +00:00
|
|
|
];
|
2006-08-23 16:09:03 +00:00
|
|
|
|
2016-08-04 09:09:43 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-06-30 02:19:12 +00:00
|
|
|
preBuild = ''
|
|
|
|
cd src
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Install the “prefabs”.
|
|
|
|
mkdir -p "$out/share/ploticus/prefabs"
|
|
|
|
cp -rv prefabs/* "$out/share/ploticus/prefabs"
|
|
|
|
|
|
|
|
# Add aliases for backwards compatibility.
|
|
|
|
ln -s "pl" "$out/bin/ploticus"
|
2017-03-01 07:41:44 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "A non-interactive software package for producing plots and charts";
|
2021-06-30 02:19:12 +00:00
|
|
|
longDescription = ''
|
|
|
|
Ploticus is a free, GPL'd, non-interactive
|
2008-03-26 22:54:16 +00:00
|
|
|
software package for producing plots, charts, and graphics from
|
|
|
|
data. Ploticus is good for automated or just-in-time graph
|
|
|
|
generation, handles date and time data nicely, and has basic
|
|
|
|
statistical capabilities. It allows significant user control
|
2021-06-30 02:19:12 +00:00
|
|
|
over colors, styles, options and details.
|
|
|
|
'';
|
2015-05-19 20:06:12 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://ploticus.sourceforge.net/";
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = with platforms; linux;
|
2008-03-26 22:54:16 +00:00
|
|
|
};
|
2006-08-23 16:09:03 +00:00
|
|
|
}
|