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