1{
2 lib,
3 mkDerivation,
4
5 cmake,
6 extra-cmake-modules,
7 makeWrapper,
8 shared-mime-info,
9
10 fetchpatch,
11 qtbase,
12 qtsvg,
13 qttools,
14 qtwebengine,
15 qtxmlpatterns,
16
17 poppler,
18
19 karchive,
20 kcompletion,
21 kconfig,
22 kcoreaddons,
23 kcrash,
24 kdoctools,
25 ki18n,
26 kiconthemes,
27 kio,
28 knewstuff,
29 kparts,
30 kpty,
31 ktexteditor,
32 ktextwidgets,
33 kxmlgui,
34 syntax-highlighting,
35
36 libspectre,
37
38 # Backends. Set to null if you want to omit from the build
39 withAnalitza ? true,
40 analitza,
41 wtihJulia ? true,
42 julia,
43 withQalculate ? true,
44 libqalculate,
45 withLua ? true,
46 luajit,
47 withPython ? true,
48 python3,
49 withR ? true,
50 R,
51 withSage ? true,
52 sage,
53 sage-with-env ? sage.with-env,
54}:
55
56mkDerivation {
57 pname = "cantor";
58
59 nativeBuildInputs = [
60 cmake
61 extra-cmake-modules
62 makeWrapper
63 shared-mime-info
64 qttools
65 ];
66
67 buildInputs = [
68 qtbase
69 qtsvg
70 qtwebengine
71 qtxmlpatterns
72
73 poppler
74
75 karchive
76 kcompletion
77 kconfig
78 kcoreaddons
79 kcrash
80 kdoctools
81 ki18n
82 kiconthemes
83 kio
84 knewstuff
85 kparts
86 kpty
87 ktexteditor
88 ktextwidgets
89 kxmlgui
90 syntax-highlighting
91
92 libspectre
93 ]
94 # backends
95 ++ lib.optional withAnalitza analitza
96 ++ lib.optional wtihJulia julia
97 ++ lib.optional withQalculate libqalculate
98 ++ lib.optional withLua luajit
99 ++ lib.optional withPython python3
100 ++ lib.optional withR R
101 ++ lib.optional withSage sage-with-env;
102
103 qtWrapperArgs = [
104 "--prefix PATH : ${placeholder "out"}/bin"
105 ]
106 ++ lib.optional withSage "--prefix PATH : ${sage-with-env}/bin";
107
108 # Causes failures on Hydra and ofborg from some reason
109 enableParallelBuilding = false;
110
111 patches = [
112 # fix build for julia 1.1 from upstream
113 (fetchpatch {
114 url = "https://github.com/KDE/cantor/commit/ed9525ec7895c2251668d11218f16f186db48a59.patch?full_index=1";
115 hash = "sha256-paq0e7Tl2aiUjBf1bDHLLUpShwdCQLICNTPNsXSoe5M=";
116 })
117 ];
118
119 meta = {
120 description = "Front end to powerful mathematics and statistics packages";
121 homepage = "https://cantor.kde.org/";
122 license = with lib.licenses; [
123 bsd3
124 cc0
125 gpl2Only
126 gpl2Plus
127 gpl3Only
128 ];
129 maintainers = with lib.maintainers; [ hqurve ];
130 };
131}