2021-09-26 13:31:17 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, enableWX ? false
|
|
|
|
, wxGTK31, wxmac
|
|
|
|
, enableXWin ? false
|
|
|
|
, libX11
|
|
|
|
}:
|
2019-12-04 15:42:12 +00:00
|
|
|
|
2021-09-26 13:31:17 +00:00
|
|
|
let
|
|
|
|
wxWidgets = (if stdenv.isDarwin then wxmac else wxGTK31);
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-12-04 15:42:12 +00:00
|
|
|
pname = "plplot";
|
|
|
|
version = "5.15.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-06 01:56:39 +00:00
|
|
|
url = "mirror://sourceforge/project/${pname}/${pname}/${version}%20Source/${pname}-${version}.tar.gz";
|
2019-12-04 15:42:12 +00:00
|
|
|
sha256 = "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-09-25 03:10:22 +00:00
|
|
|
buildInputs = lib.optional enableWX wxWidgets
|
|
|
|
++ lib.optional enableXWin libX11;
|
2021-09-26 13:31:17 +00:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit
|
|
|
|
enableWX
|
|
|
|
wxWidgets
|
|
|
|
enableXWin
|
|
|
|
libX11
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
2019-12-04 15:42:12 +00:00
|
|
|
cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" "-DBUILD_TEST=ON" ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-12-04 15:42:12 +00:00
|
|
|
description = "Cross-platform scientific graphics plotting library";
|
|
|
|
homepage = "https://plplot.org";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
};
|
|
|
|
}
|