2024-09-26 11:04:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
cmake,
|
|
|
|
pkg-config,
|
|
|
|
enableWX ? false,
|
|
|
|
wxGTK32,
|
|
|
|
Cocoa,
|
|
|
|
enableXWin ? false,
|
|
|
|
xorg,
|
|
|
|
enablePNG ? false,
|
|
|
|
cairo,
|
|
|
|
pango,
|
2021-10-17 09:34:42 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2024-09-26 11:04:55 +00:00
|
|
|
pname = "plplot";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "5.15.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "mirror://sourceforge/project/${pname}/${pname}/${version}%20Source/${pname}-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr";
|
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs =
|
|
|
|
lib.optional enableWX wxGTK32
|
|
|
|
++ lib.optional (enableWX && stdenv.hostPlatform.isDarwin) Cocoa
|
|
|
|
++ lib.optional enableXWin xorg.libX11
|
|
|
|
++ lib.optionals enablePNG [
|
|
|
|
cairo
|
|
|
|
pango
|
|
|
|
];
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
passthru = {
|
2022-10-21 18:38:19 +00:00
|
|
|
inherit (xorg) libX11;
|
2021-10-17 09:34:42 +00:00
|
|
|
inherit
|
|
|
|
enableWX
|
|
|
|
enableXWin
|
2024-09-26 11:04:55 +00:00
|
|
|
;
|
2021-10-17 09:34:42 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_TEST=ON"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Cross-platform scientific graphics plotting library";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pltek";
|
2024-09-26 11:04:55 +00:00
|
|
|
homepage = "https://plplot.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
2024-09-26 11:04:55 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.lgpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|