2021-06-30 03:19:12 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, zlib
|
|
|
|
, libX11
|
|
|
|
, libpng
|
2021-06-30 04:03:07 +01:00
|
|
|
, gd
|
|
|
|
, freetype
|
2021-06-30 03:19:12 +01:00
|
|
|
}:
|
2006-08-23 17:09:03 +01:00
|
|
|
|
2021-06-30 03:53:01 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-06-30 03:19:12 +01:00
|
|
|
pname = "ploticus";
|
|
|
|
version = "2.42";
|
2006-08-23 17:09:03 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-30 03:53:01 +01:00
|
|
|
url = "mirror://sourceforge/ploticus/ploticus/${version}/ploticus${lib.replaceStrings [ "." ] [ "" ] version}_src.tar.gz";
|
|
|
|
sha256 = "PynkufQFIDqT7+yQDlgW2eG0OBghiB4kHAjKt91m4LA=";
|
2006-08-23 17:09:03 +01:00
|
|
|
};
|
|
|
|
|
2021-06-30 03:19:12 +01: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 04:03:07 +01: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 03:19:12 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
libX11
|
|
|
|
libpng
|
2021-06-30 04:03:07 +01:00
|
|
|
gd
|
|
|
|
freetype
|
2021-06-30 03:19:12 +01:00
|
|
|
];
|
2006-08-23 17:09:03 +01:00
|
|
|
|
2016-08-04 10:09:43 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-06-30 03:19:12 +01: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 03:19:12 +01: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 03:19:12 +01:00
|
|
|
over colors, styles, options and details.
|
|
|
|
'';
|
2015-05-19 21:06:12 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://ploticus.sourceforge.net/";
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = with platforms; linux;
|
2008-03-26 22:54:16 +00:00
|
|
|
};
|
2006-08-23 17:09:03 +01:00
|
|
|
}
|