1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{
lib,
stdenv,
fetchurl,
cmake,
pkg-config,
enableWX ? false,
wxGTK32,
Cocoa,
enableXWin ? false,
xorg,
enablePNG ? false,
cairo,
pango,
}:
stdenv.mkDerivation rec {
pname = "plplot";
version = "5.15.0";
src = fetchurl {
url = "mirror://sourceforge/project/${pname}/${pname}/${version}%20Source/${pname}-${version}.tar.gz";
sha256 = "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs =
lib.optional enableWX wxGTK32
++ lib.optional (enableWX && stdenv.hostPlatform.isDarwin) Cocoa
++ lib.optional enableXWin xorg.libX11
++ lib.optionals enablePNG [
cairo
pango
];
passthru = {
inherit (xorg) libX11;
inherit
enableWX
enableXWin
;
};
cmakeFlags = [
"-DBUILD_TEST=ON"
];
doCheck = true;
meta = with lib; {
description = "Cross-platform scientific graphics plotting library";
mainProgram = "pltek";
homepage = "https://plplot.org";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.unix;
license = licenses.lgpl2;
};
}
|