22 groupId = "org.apache.commons";
23 artifactId = "commons-math3";
25 hash = "sha256-HlbXsFjSi2Wr0la4RY44hbZ0wdWI+kPNfRy7nH7yswg=";
30 groupId = "com.google.guava";
33 hash = "sha256-1mT7/APS5c6cqypE+wHx0L+d/r7MwaRzsfnqMfefb5k=";
38 groupId = "com.google.gwt";
39 artifactId = "gwt-dev";
41 hash = "sha256-iS8VpnMPuxE9L9hkTJVtW5Tqgw2TIYei47zRvkdoK0o=";
44 groupId = "com.google.gwt";
45 artifactId = "gwt-user";
47 hash = "sha256-3IlJ+b6C0Gmuh7aAFg9+ldgvZCdfJmTB8qcdC4HZC9g=";
50 groupId = "net.opentsdb";
51 artifactId = "opentsdb-gwt-theme";
53 hash = "sha256-JJsjcRlQmIrwpOtMweH12e/Ut5NG8R50VPiOAMMGEdc=";
58 url = "mirror://maven/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar";
59 groupId = "org.hamcrest";
60 artifactId = "hamcrest-core";
62 hash = "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok=";
67 groupId = "org.hbase";
68 artifactId = "asynchbase";
70 hash = "sha256-D7mKprHMW23dE0SzdNsagv3Hp2G5HUN7sKfs1nVzQF4=";
75 groupId = "com.fasterxml.jackson.core";
76 artifactId = "jackson-annotations";
78 hash = "sha256-0lW0uGP/jscUqPlvpVw0Yh1D27grgtP1dHZJakwJ4ec=";
81 groupId = "com.fasterxml.jackson.core";
82 artifactId = "jackson-core";
84 hash = "sha256-ARQYfilrNMkxwb+eWoQVK2K/q30YL1Yj85gtwto15SY=";
87 groupId = "com.fasterxml.jackson.core";
88 artifactId = "jackson-databind";
90 hash = "sha256-QjoMgG3ks/petKKGmDBeOjd3xzHhvPobLzo3YMe253M=";
95 groupId = "net.java.dev.javacc";
96 artifactId = "javacc";
98 hash = "sha256-7Qxclglhz+tDE4LPAVKCewEVZ0fbN5LRv5PoHjLCBKs=";
102 (fetchMavenArtifact {
103 groupId = "org.javassist";
104 artifactId = "javassist";
105 version = "3.21.0-GA";
106 hash = "sha256-eqWeAx+UGYSvB9rMbKhebcm9OkhemqJJTLwDTvoSJdA=";
110 (fetchMavenArtifact {
111 groupId = "commons-logging";
112 artifactId = "commons-logging";
114 hash = "sha256-2t3qHqC+D1aXirMAa4rJKDSv7vvZt+TmMW/KV98PpjY=";
116 (fetchMavenArtifact {
117 groupId = "org.apache.commons";
118 artifactId = "commons-jexl";
120 hash = "sha256-A8mp+uXaeM5SwL8kRnzDc1W34jGW3/SDniwP8BigEwY=";
124 (fetchMavenArtifact {
125 groupId = "org.jgrapht";
126 artifactId = "jgrapht-core";
128 hash = "sha256-5u8cEVaJ7aCBQrhtUkYg2mQ7bp8BNAUletB/QtxcaXg=";
132 (fetchMavenArtifact {
134 artifactId = "junit";
136 hash = "sha256-kKjhYD7spI5+h586+8lWBxUyKYXzmidPb2BwtD+dBv4=";
140 (fetchMavenArtifact {
141 groupId = "org.ow2.asm";
144 hash = "sha256-+y3ekCCke7AkxD2d4KlOc6vveTvwjwE1TMl8stLiqVc=";
146 (fetchMavenArtifact {
147 groupId = "com.esotericsoftware.kryo";
150 hash = "sha256-adEG73euU3sZBp9WUQNLZBN6Y3UAZXTAxjsuvDuy7q4=";
152 (fetchMavenArtifact {
153 groupId = "com.esotericsoftware.minlog";
154 artifactId = "minlog";
156 hash = "sha256-pnjLGqj10D2QHJksdXQYQdmKm8PVXa0C6E1lMVxOYPI=";
158 (fetchMavenArtifact {
159 groupId = "com.esotericsoftware.reflectasm";
160 artifactId = "reflectasm";
162 classifier = "shaded";
163 hash = "sha256-CKcOrbSydO2u/BGUwfdXBiGlGwqaoDaqFdzbe5J+fHY=";
167 (fetchMavenArtifact {
168 groupId = "ch.qos.logback";
169 artifactId = "logback-classic";
171 hash = "sha256-uGal2myLeOFVxn/M11YoYNC1/Hdric2WjC8/Ljf8OgI=";
173 (fetchMavenArtifact {
174 groupId = "ch.qos.logback";
175 artifactId = "logback-core";
177 hash = "sha256-R0CgmLtEOnRFVN093wYsaCKHspQGZ1TikuE0bIv1zt0=";
181 (fetchMavenArtifact {
182 groupId = "org.mockito";
183 artifactId = "mockito-core";
185 hash = "sha256-+XSDuglEufoTOqKWOHZN2+rbUew9vAIHTFj6LK7NB/o=";
189 (fetchMavenArtifact {
190 groupId = "io.netty";
191 artifactId = "netty";
192 version = "3.10.6.Final";
193 hash = "sha256-h2ilD749k6iNjmAA6l1o4w9Q3JFbN2TDxYcPcMT7O0k=";
197 (fetchMavenArtifact {
198 groupId = "org.objenesis";
199 artifactId = "objenesis";
201 hash = "sha256-3U7z0wkQY6T+xXjLsrvmwfkhwACRuimT3Nmv0l/5REo=";
205 (fetchMavenArtifact {
206 groupId = "org.powermock";
207 artifactId = "powermock-mockito-release-full";
210 hash = "sha256-GWXaFG/ZtPlc7uKrghQHNAPzEu2k5VGYCYTXIlbylb4=";
214 (fetchMavenArtifact {
215 groupId = "com.google.protobuf";
216 artifactId = "protobuf-java";
218 hash = "sha256-4MHGRXXABWAXJefGoCzr+eEoXoiPdWsqHXP/qNclzHQ=";
222 (fetchMavenArtifact {
223 groupId = "org.slf4j";
224 artifactId = "log4j-over-slf4j";
226 hash = "sha256-QHMpiJioL0KeHr2iNaMUc7G0jDR94ShnNbtnkiUm6uQ=";
228 (fetchMavenArtifact {
229 groupId = "org.slf4j";
230 artifactId = "slf4j-api";
232 hash = "sha256-LyqS1BCyaBOdfWO3XtJeIZlc/kEAwZvyNXfP28gHe9o=";
236 (fetchMavenArtifact {
237 groupId = "com.stumbleupon";
238 artifactId = "async";
240 hash = "sha256-FJ1HH68JOkjNtkShjLTJ8K4NO/A/qu88ap7J7SEndrM=";
244 (fetchMavenArtifact {
245 groupId = "javax.validation";
246 artifactId = "validation-api";
247 version = "1.0.0.GA";
248 hash = "sha256-5FnzE+vG2ySD+M6q05rwcIY2G0dPqS5A9ELo3l2Yldw=";
250 (fetchMavenArtifact {
251 groupId = "javax.validation";
252 artifactId = "validation-api";
253 version = "1.0.0.GA";
254 classifier = "sources";
255 hash = "sha256-o5TVKpt/4rsU8HGNKzyDCP/o836RGVYBI5jVXJ+fm1Q=";
259 (fetchMavenArtifact {
260 groupId = "org.apache.zookeeper";
261 artifactId = "zookeeper";
263 hash = "sha256-ijdaHvmMvA4fbp39DZbZFLdNN60AtL+Bvrd/qPNNM64=";
267 in stdenv.mkDerivation rec {
271 src = fetchFromGitHub {
274 rev = "refs/tags/v${version}";
275 hash = "sha256-899m1H0UCLsI/bnSrNFnnny4MxSw3XBzf7rgDuEajDs=";
280 name = "bump-deps.0.patch";
281 url = "https://github.com/OpenTSDB/opentsdb/commit/2f4bbfba2f9a32f9295123e8b90adba022c11ece.patch";
282 hash = "sha256-4LpR4O8mNiJZQ7PUmAzFdkZAaF8i9/ZM5NhQ+8AJgSw=";
285 name = "bump-deps.1.patch";
286 url = "https://github.com/OpenTSDB/opentsdb/commit/8c6a86ddbc367c7e4e2877973b70f77c105c6158.patch";
287 hash = "sha256-LZHqDOhwO/Gfgu870hJ6/uxnmigv7RP8OFe2a7Ug5SM=";
290 name = "bump-deps.2.patch";
291 url = "https://github.com/OpenTSDB/opentsdb/commit/9b62442ba5c006376f57ef250fb7debe1047c3bf.patch";
292 hash = "sha256-2VjI9EkirKj4h7xhUtWdnKxJG0Noz3Hk5njm3pYEU1g=";
295 name = "CVE-2023-25826.prerequisite.0.patch";
296 url = "https://github.com/OpenTSDB/opentsdb/commit/a82a4f85f0fc1af554a104f28cc495451b26b1f6.patch";
297 hash = "sha256-GgoRZUGdKthK+ZwMpgSQQ4V2oHyqi8SwWGZT571gltQ=";
300 name = "CVE-2023-25826.prerequisite.1.patch";
301 url = "https://github.com/OpenTSDB/opentsdb/commit/22b27ea30a859a6dbdcd65fcdf61190d46e1b677.patch";
302 hash = "sha256-pXo6U7d4iy2squAiFvV2iDAQcNDdrl0pIOQEXfkJ3a8=";
305 name = "CVE-2023-25826.patch";
306 url = "https://github.com/OpenTSDB/opentsdb/commit/07c4641471c6f5c2ab5aab615969e97211eb50d9.patch";
307 hash = "sha256-88gIOhAhLCQC/UesIdYtjf0UgKNfnO0W2icyoMmiC3U=";
310 name = "CVE-2023-25827.patch";
311 url = "https://github.com/OpenTSDB/opentsdb/commit/fa88d3e4b5369f9fb73da384fab0b23e246309ba.patch";
312 hash = "sha256-FJHUiEmGhBIHoyOwNZtUWA36ENbrqDkUT8HfccmMSe8=";
316 nativeBuildInputs = [
322 buildInputs = [ curl jdk nettools python3 git ];
325 chmod +x build-aux/fetchdep.sh.in
326 patchShebangs ./build-aux/
330 preBuild = lib.concatStrings (lib.mapAttrsToList (dir: lib.concatMapStrings (artifact: ''
331 cp ${artifact}/share/java/* third_party/${dir}
335 wrapProgram $out/bin/tsdb \
336 --set JAVA_HOME "${jre}" \
337 --set JAVA "${jre}/bin/java"
341 description = "Time series database with millisecond precision";
342 homepage = "http://opentsdb.net";
343 license = licenses.lgpl21Plus;
344 platforms = lib.platforms.linux;
345 sourceProvenance = with sourceTypes; [
347 binaryBytecode # maven dependencies
350 mainProgram = "tsdb";