2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, enableWX ? false
|
2022-10-21 18:38:19 +00:00
|
|
|
, wxGTK32
|
|
|
|
, Cocoa
|
2021-10-17 09:34:42 +00:00
|
|
|
, enableXWin ? false
|
2022-10-21 18:38:19 +00:00
|
|
|
, xorg
|
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 {
|
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 ];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = lib.optional enableWX wxGTK32
|
|
|
|
++ lib.optional (enableWX && stdenv.isDarwin) Cocoa
|
|
|
|
++ lib.optional enableXWin xorg.libX11;
|
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
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
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";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://plplot.org";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
};
|
|
|
|
}
|