2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, enableWX ? false
|
|
|
|
, wxGTK31, wxmac
|
|
|
|
, enableXWin ? false
|
|
|
|
, libX11
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
let
|
|
|
|
wxWidgets = (if stdenv.isDarwin then wxmac else wxGTK31);
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "plplot";
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
buildInputs = lib.optional enableWX wxWidgets
|
|
|
|
++ lib.optional enableXWin libX11;
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit
|
|
|
|
enableWX
|
|
|
|
wxWidgets
|
|
|
|
enableXWin
|
|
|
|
libX11
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
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";
|
|
|
|
homepage = "https://plplot.org";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
};
|
|
|
|
}
|