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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
|
;;; Java library dependencies of the hmftools tool chain.
;;;
;;; Each package here corresponds to a Maven artifact that hmf-common (or
;;; another core hmftools module) depends on at compile time and that is
;;; either missing from Guix mainline or pinned to an older version.
;;;
;;; When Guix mainline already ships an equivalent (java-guava,
;;; java-gson, java-commons-*, java-htsjdk-latest, java-jcommander,
;;; java-junit-4.13.2, ...) we reuse it directly from
;;; (gnu packages java) / (gnu packages bioinformatics); only the deltas
;;; live here.
(define-module (hmf packages java-libraries)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix build-system ant)
#:use-module (guix build-system trivial)
#:use-module (gnu packages bioinformatics)
#:use-module (gnu packages compression)
#:use-module (gnu packages java)
#:use-module (gnu packages java-compression))
(define-public java-pcollections
(package
(name "java-pcollections")
(version "4.0.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/hrldcpr/pcollections")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"097jsjsl3f8bfjbbkpi2iwiincj4w6a5bm5bpxipbi02v6014r6a"))
(modules '((guix build utils)))
(snippet
;; Drop the JPMS module descriptor; ant-build-system's
;; javac invocation cannot compile module-info.java, and
;; hmftools does not consume pcollections as a module.
'(delete-file "src/main/java/module-info.java"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "pcollections.jar"
#:source-dir "src/main/java"
;; Upstream tests are JUnit 5; guix's java-junit is JUnit 4.
#:tests? #f))
(home-page "https://github.com/hrldcpr/pcollections")
(synopsis "Persistent, immutable collections for Java")
(description
"PCollections serves as a persistent and immutable analogue of the
Java Collections Framework. It provides persistent versions of List,
Set, Map, Stack and their sorted variants; every mutating operation
returns a new collection sharing structure with the original.")
(license license:expat)))
(define-public java-j2html
(package
(name "java-j2html")
(version "1.6.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/tipsy/j2html")
(commit (string-append "j2html-" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1g2g73pnv4bh2zchlrgfb1s94rck87v891cf8y804y905c25s984"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "j2html.jar"
#:source-dir "library/src/main/java"
;; Tests require JUnit + hamcrest + commons-lang3-3.0; skip to
;; avoid pulling in the older commons-lang3 build.
#:tests? #f))
(home-page "https://j2html.com")
(synopsis "Java to HTML builder with a fluent API")
(description
"j2html is a small library for generating HTML documents in Java
using a fluent, type-safe builder API. It exposes a helper class per
HTML5 tag and combines them via method chaining, escaping user data by
default.")
(license license:asl2.0)))
(define-public java-jfreesvg
(package
(name "java-jfreesvg")
(version "5.0.5")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/jfree/jfreesvg")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"19p3q3ginkvnx6wx4xq4a5zlmkjmp3sm926bkp5434z8v6z6jf48"))
(modules '((guix build utils)))
(snippet
;; icedtea-8's javac cannot parse module-info.java.
'(delete-file "src/main/java/module-info.java"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "jfreesvg.jar"
#:source-dir "src/main/java"
;; Tests are JUnit 5 (junit-jupiter); Guix ships JUnit 4.
#:tests? #f))
(home-page "http://www.jfree.org/jfreesvg/")
(synopsis "Java library for generating SVG output using Graphics2D")
(description
"JFreeSVG generates Scalable Vector Graphics (SVG) content from
Java's Graphics2D API. It is used by hmftools to render analytical
plots (BAF, coverage, purity) as SVG for the ORANGE PDF report.")
(license license:gpl3)))
(define-public java-intellij-annotations
;; The 12.0 tag on JetBrains/intellij-community is an entire IDE
;; monorepo; the small com.intellij:annotations jar is easier to
;; source from Maven Central's -sources.jar and rebuild with ant.
(package
(name "java-intellij-annotations")
(version "12.0")
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/com/intellij/"
"annotations/" version "/annotations-" version
"-sources.jar"))
(sha256
(base32
"0lpk5nhcmkc5wix6kc9f883brxmz97qa6r86fygvximwfyb6n3nb"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "intellij-annotations.jar"
#:source-dir "."
#:tests? #f
#:phases
(modify-phases %standard-phases
(replace 'unpack
(lambda* (#:key source #:allow-other-keys)
(mkdir "src")
(with-directory-excursion "src"
(invoke "jar" "-xf" source))
(chdir "src"))))))
(home-page "https://www.jetbrains.com/help/idea/annotating-source-code.html")
(synopsis "JetBrains @@Nullable/@@NotNull source-code annotations")
(description
"This is the classic com.intellij:annotations artifact (version
12.0) shipped by JetBrains; it defines @code{@@Nullable},
@code{@@NotNull}, @code{@@Nls} and related annotations used to hint
static analysers and IDEs. hmf-common consumes it as a
compile-time-only dependency; no runtime code is contributed.")
(license license:asl2.0)))
(define-public java-immutables-value
;; Upstream ships this artifact as a shaded fat jar (via
;; maven-shade-plugin): value-annotations + value-processor +
;; generator + guava, with com.google.common relocated under
;; org.immutables.value.internal.$guava$. Reproducing that shade
;; recipe with ant would require rebuilding four sibling modules and
;; a package-relocating jar rewrite step. Since the artifact is only
;; consumed at compile time as an annotation processor (Maven scope
;; 'provided'), we fetch the Apache-2.0-licensed pre-built jar from
;; Maven Central and install it verbatim. See
;; https://github.com/immutables/immutables/blob/2.9.3/value/pom.xml
;; for the upstream shade recipe.
(package
(name "java-immutables-value")
(version "2.9.3")
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/org/immutables/"
"value/" version "/value-" version ".jar"))
(sha256
(base32
"11bmk65z8m8d4gzipxy83g5ygnv89m1879s4bi4pn8ah9z07qsyi"))))
(build-system trivial-build-system)
(arguments
(list
#:modules '((guix build utils))
#:builder
#~(begin
(use-modules (guix build utils))
(let ((dest (string-append #$output "/share/java")))
(mkdir-p dest)
(copy-file #$(package-source this-package)
(string-append dest "/value-" #$version ".jar"))))))
(home-page "https://immutables.github.io/")
(synopsis "Java annotation processor for immutable value objects")
(description
"Immutables generates simple, safe and consistent value objects
from an @code{@@Value.Immutable}-annotated abstract type: builders,
withers, structural equality, hashing and JSON binding are all
derived at compile time. hmf-common uses it as a compile-time-only
(@code{provided}) annotation processor to generate ImmutableXxx
implementations of its VCF / GRIPSS / PURPLE data model types.")
(license license:asl2.0)))
(define* (maven-central-jar name version group-path artifact hash
#:key
(synopsis "Pre-built Maven Central jar")
(description "")
(home-page "https://mvnrepository.com/")
(license license:asl2.0))
"Return a package that fetches ARTIFACT-VERSION.jar from Maven Central
under GROUP-PATH (slash-separated) and installs it verbatim under
share/java. A pragmatic shortcut for compile-time deps whose from-
source Maven build would drag in non-trivial scaffolding; matches
the pattern already used for java-immutables-value and friends."
(package
(name name)
(version version)
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/"
group-path "/" artifact "/" version
"/" artifact "-" version ".jar"))
(sha256 (base32 hash))))
(build-system trivial-build-system)
(arguments
(list
#:modules '((guix build utils))
#:builder
#~(begin
(use-modules (guix build utils))
(let ((dest (string-append #$output "/share/java")))
(mkdir-p dest)
(copy-file #$(package-source this-package)
(string-append dest "/"
#$artifact "-" #$version ".jar"))))))
(home-page home-page)
(synopsis synopsis)
(description description)
(license license)))
(define* (maven-central-source-jar name version group-path artifact hash
#:key
(inputs '())
(synopsis
"Java library built from its Maven Central sources")
(description "")
(home-page "https://mvnrepository.com/")
(license license:asl2.0)
(jar-name #f)
(prune '())
(extra-resources '()))
"Return a package that fetches ARTIFACT-VERSION-sources.jar from Maven
Central under GROUP-PATH (slash-separated) and compiles it with javac.
This is the build-from-source counterpart of maven-central-jar: same
artifact, same version, same installed jar name, but the classes are
compiled here instead of being copied out of the binary jar. INPUTS are
the compile-time dependencies that must be on the classpath (they also
land on consumers' runtime classpath, as before via their own inputs).
PRUNE is a list of regexps matched against paths relative to the
unpacked source root; matching files are deleted before compiling.
Several artifacts ship optional integrations (Avalon logging, OSGi
package annotations, c3p0, ...) whose dependencies are not worth
packaging."
(package
(name name)
(version version)
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/"
group-path "/" artifact "/" version
"/" artifact "-" version "-sources.jar"))
(sha256 (base32 hash))))
(build-system ant-build-system)
(arguments
(list
#:jar-name (or jar-name (string-append artifact "-" version ".jar"))
;; ant-build-system's unpack sends .jar sources through 'jar -xf'
;; into "src".
#:source-dir "src"
;; Several of these artifacts target Java 9+ language features
;; (instanceof patterns, java.util.concurrent.Flow,
;; RecordComponentVisitor); the default jdk of ant-build-system is
;; far too old for them.
#:jdk openjdk17
#:tests? #f
#:phases
#~(modify-phases %standard-phases
;; Drop sources we cannot or do not want to build (optional
;; integrations, OSGi package annotations, ...).
(add-before 'build 'prune-sources
(lambda _
(use-modules (srfi srfi-1) (ice-9 regex))
;; Multi-release artifacts ship a second copy of some
;; classes under META-INF/versions/; ant's flat javac
;; would compile both and the jar target then fails with
;; "duplicate class". Keep the base version only.
(for-each (lambda (file)
(when (string-prefix? "META-INF/versions/"
(substring file 4))
(delete-file file)))
(find-files "src" ".+"))
(when (pair? '#$prune)
(for-each
(lambda (file)
(when (any (lambda (re)
(string-match re (substring file 4)))
'#$prune)
(delete-file file)))
(find-files "src" ".+")))))
;; ant's javac has no module path of its own: compiling a
;; module-info.java together with a classpath fails with
;; "class, interface, or enum expected". Drop it; the jar
;; stays a plain classpath jar, which is what consumers use.
(add-before 'build 'drop-module-info
(lambda _
(for-each delete-file
(find-files "src" "^module-info\\.java$"))))
;; A sources archive keeps resources (META-INF/services,
;; *.properties, ...) next to the .java files; ant's generated
;; build.xml only jars the class tree. Copy the resources in
;; before the jar target runs, or services such as SLF4J
;; bindings and log4j providers silently disappear.
(add-before 'build 'copy-resources
(lambda _
(mkdir-p "build/classes")
;; Maven records groupId/artifactId/version in
;; META-INF/maven/<groupId>/<artifactId>/pom.properties.
;; Some libraries (DJL) read it back at runtime to report
;; or validate versions, so synthesise it.
(let ((dir (string-append "build/classes/META-INF/maven/"
(string-join
(string-split #$group-path #\/)
".")
"/" #$artifact)))
(mkdir-p dir)
(call-with-output-file (string-append dir "/pom.properties")
(lambda (port)
(format port
"groupId=~a~%artifactId=~a~%version=~a~%"
(string-join (string-split #$group-path #\/) ".")
#$artifact #$version))))
;; Extra generated resources (files Maven's filtering
;; produces but the sources archive does not carry).
(for-each
(lambda (entry)
(let ((dest (string-append "build/classes/" (car entry))))
(mkdir-p (dirname dest))
(call-with-output-file dest
(lambda (port) (display (cdr entry) port)))))
'#$extra-resources)
(for-each
(lambda (file)
(let ((dest (string-append "build/classes/"
(substring file 4))))
(unless (string-suffix? "META-INF/MANIFEST.MF" dest)
(mkdir-p (dirname dest))
(copy-file file dest))))
(find-files "src"
(lambda (file stat)
(and (eq? 'regular (stat:type stat))
(not (string-suffix? ".java" file)))))))))))
(inputs inputs)
(home-page home-page)
(synopsis synopsis)
(description description)
(license license)))
(define-public java-commons-logging
(maven-central-source-jar
"java-commons-logging" "1.2"
"commons-logging" "commons-logging"
"0haz8mcja5qc2g2xbpx0z0vbwibkx58k5cwwirr62146wp7pld24"
#:synopsis "Apache Commons Logging facade"
#:description
"Commons Logging is a thin adapter to a variety of logging
implementations. This is the version Apache PDFBox and FontBox
compile against; Guix mainline has no commons-logging package. The
optional Avalon / Log4j 1.x / servlet bridges are pruned: their
dependencies are not packaged and PDFBox never touches them."
#:prune (list "^org/apache/commons/logging/impl/(AvalonLogger|Log4JLogger|LogKitLogger|ServletContextCleaner)\\.java$")
#:home-page "https://commons.apache.org/proper/commons-logging/"
#:license license:asl2.0))
(define-public java-protobuf-java
(maven-central-source-jar
"java-protobuf-java" "3.6.1"
"com/google/protobuf" "protobuf-java"
"1vmfpxg5hppj3qjnjnn24556xv9xly2ygg2qzsnpddmib6qrd2cy"
#:synopsis "Protocol Buffers runtime for Java"
#:description
"protobuf-java is the Java runtime for Google's Protocol Buffers.
Its Maven Central sources jar already carries the generated message
classes, so it compiles without protoc. Needed at compile time by
mysql-connector-java's X-protocol classes."
#:home-page "https://protobuf.dev/"
#:license license:bsd-3))
(define-public java-jakarta-inject
(maven-central-source-jar
"java-jakarta-inject" "2.0.1"
"jakarta/inject" "jakarta.inject-api"
"1jfia8vsz6qr4shhmm06yn7lxxa2y24zgw1nf7cbgy39v8zwgx24"
#:synopsis "Jakarta Dependency Injection API (annotations only)"
#:description
"The jakarta.inject API (Inject, Named, Qualifier, Scope, ...)
that Google Guice 7 implements: nine annotation types, no runtime
behaviour."
#:home-page "https://jakarta.ee/specifications/dependency-injection/"
#:license license:asl2.0))
(define-public java-jakarta-activation
(maven-central-source-jar
"java-jakarta-activation" "1.2.2"
"com/sun/activation" "jakarta.activation"
"0lxay8chanpg5kzpwai0pqvalk322j1d90w1fz0jjpaxvzljrxgq"
#:synopsis "Jakarta Activation 1.2 (javax.activation + implementation)"
#:description
"This artifact carries both the javax.activation API and its
reference implementation (com.sun.activation.registries,
MailcapCommandMap, DataHandler, ...). JAXB's attachment API,
istack-commons-runtime and stax-ex compile against it; the plain
jakarta.activation-api jar has the interfaces only."
#:home-page "https://jakarta.ee/specifications/activation/"
#:license license:bsd-3))
(define-public java-jpa-api
(maven-central-source-jar
"java-jpa-api" "2.2"
"javax/persistence" "javax.persistence-api"
"0kshnbw6asi1xlp4msn75pav096xvignavl2hqyif0lr5jh9jz2y"
#:synopsis "JPA 2.2 API (javax.persistence)"
#:description
"The javax.persistence API (annotations and interfaces of the Java
Persistence API 2.2). jOOQ's converter plumbing and its JPA-enabled
record classes compile against it."
#:home-page "https://jakarta.ee/specifications/persistence/2.2/"
#:license license:epl2.0))
(define-public java-jaxb-api
(maven-central-source-jar
"java-jaxb-api" "2.3.1"
"javax/xml/bind" "jaxb-api"
"17bbr4qh36sk8fd4fb9ldcr3dsbs8w0sxvqnx6v5zprki31c57fn"
#:inputs (list java-jakarta-activation)
#:synopsis "JAXB 2.3 API"
#:description
"javax.xml.bind.* API classes removed from the JDK after Java 8;
required at runtime by tools that unmarshal XML into annotated
JavaBeans -- notably jOOQ codegen reading its configuration XML."))
(define-public java-stax-ex
(maven-central-source-jar
"java-stax-ex" "1.8.1"
"org/jvnet/staxex" "stax-ex"
"170j96n3zdfhy4z3aml92ic6pv4argry3yj9br19992a868xacqk"
#:inputs (list java-jakarta-activation java-jaxb-api)
#:synopsis "Extensions to the StAX API used by JAXB"
#:description
"stax-ex adds StreamReaderDelegate/StreamWriterDelegate and the
FastInfoset-aware helpers that JAXB's runtime (jaxb-runtime) builds
on."
#:home-page "https://github.com/eclipse-ee4j/jaxb-stax-ex"
#:license license:bsd-3))
(define-public java-jna
(maven-central-source-jar
"java-jna" "5.14.0"
"net/java/dev/jna" "jna"
"0d7imralh60dw1d3avgsmbs9kvr80qj6izarl36pcmi1c73p9mzb"
#:synopsis "Java Native Access (JNA)"
#:description
"JNA lets Java code call native libraries without hand-written JNI
glue. DJL's ai.djl.util.NativeResource uses it to load libtorch and
the engine JNI shim, so it is a compile-time dependency of
java-djl-api and a runtime dependency of v-chord / v-cuppa."
#:home-page "https://github.com/java-native-access/jna"
#:license license:lgpl2.1+))
(define-public java-asm-9
(maven-central-source-jar
"java-asm-9" "9.5"
"org/ow2/asm" "asm"
"0xl30xhhslhmh1vqhnjc4ijkmjc3pva7zmdq09a63q4plyxln88i"
#:synopsis "ASM 9 bytecode engineering library"
#:description
"ASM 9 is the bytecode manipulation toolkit Guice uses for its
aop-based method interception. Guix mainline ships ASM 6.0, which
predates the API (RecordComponentVisitor, conditional branches) that
Guice 7 compiles against."
#:home-page "https://asm.ow2.io/"
#:license license:bsd-3))
(define-public java-gatk-bwamem-jni
(maven-central-jar
"java-gatk-bwamem-jni" "1.0.5"
"org/broadinstitute" "gatk-bwamem-jni"
"0rxbxna8npfjyyjib7i59hlz6vb5355d33znf8gry5n6wnpis27p"
#:synopsis "JNI wrapper around BWA-MEM for the Broad Institute GATK stack"
#:description
"gatk-bwamem-jni bundles a native BWA-MEM shared library and a
thin JNI Java API used by GATK and hmftools for on-the-fly single-
read realignment. We install the pre-built Apache-2.0 jar from
Maven Central because the upstream build integrates BWA-MEM's C
sources and its own cmake toolchain. The native .so inside the jar
is x86-64 Linux only; consumers on other architectures need a
different build."
#:home-page
"https://github.com/broadinstitute/gatk-bwamem-jni"))
(define-public java-log4j-slf4j-impl
(maven-central-source-jar
"java-log4j-slf4j-impl" "2.25.3"
"org/apache/logging/log4j" "log4j-slf4j-impl"
"0x8kb1q4lincksnhd4p3s8gicc7ddxdcdjksilsfjx7x7k3599rm"
#:inputs (list java-slf4j-api java-log4j-api)
#:prune (list "package-info\\.java$")
#:synopsis "Log4j 2 SLF4J 1.7.x binding"
#:description
"Runtime binding that routes SLF4J log calls through Log4j 2.
Used by hmftools modules whose direct dependencies still log via
SLF4J."))
(define-public java-kotlin-stdlib
(maven-central-jar
"java-kotlin-stdlib" "2.1.0"
"org/jetbrains/kotlin" "kotlin-stdlib"
"0gww24g908fynjh2bff5brplv1z46iygnx7ckwlwlv1h1xxipyfn"
#:synopsis "Kotlin 2.1 standard library"
#:description
"The Kotlin standard library (kotlin.*) needed at compile and run
time by hmftools' Kotlin modules (cider, teal). Installed from
Maven Central; a from-source build would require the Kotlin
compiler toolchain."
#:home-page "https://kotlinlang.org/"))
(define-public java-kotlin-stdlib-jdk7
(maven-central-jar
"java-kotlin-stdlib-jdk7" "2.1.0"
"org/jetbrains/kotlin" "kotlin-stdlib-jdk7"
"0xlc97gyfbf2zp7irpqyvz8wqaciyw5jzvsbwvl44kvj0d16rspx"
#:synopsis "Kotlin 2.1 stdlib JDK 7 marker artifact"
#:description
"Historical Kotlin JDK 7 stdlib bridge. In Kotlin 2.x this is a
tiny marker jar; the actual JDK-7 additions have been folded into
kotlin-stdlib. Consumed by dependencies that pin the old
coordinate."
#:home-page "https://kotlinlang.org/"))
(define-public java-kotlin-stdlib-jdk8
(maven-central-jar
"java-kotlin-stdlib-jdk8" "2.1.0"
"org/jetbrains/kotlin" "kotlin-stdlib-jdk8"
"0i6mbii7gpakbqgn2294y9ajwik2sxnm88hwv989n49g95z3r393"
#:synopsis "Kotlin 2.1 stdlib JDK 8 marker artifact"
#:description
"Historical Kotlin JDK 8 stdlib bridge. In Kotlin 2.x this is a
tiny marker jar; the JDK-8 additions have been folded into
kotlin-stdlib. Consumed by dependencies that pin the old
coordinate."
#:home-page "https://kotlinlang.org/"))
(define-public java-commons-csv-1.9
(maven-central-source-jar
"java-commons-csv" "1.9.0"
"org/apache/commons" "commons-csv"
"1k4rdhy4v8p7kqf035w2xh6269idjlrran8x4zzmrkm73wy1yz63"
#:inputs (list)
#:synopsis "Apache Commons CSV 1.9 (adds CSVFormat.Builder API)"
#:description
"Apache Commons CSV 1.9. Provides the CSVFormat.Builder fluent
API added post-1.4, used by hmftools cider and other modules whose
compile-time expectations exceed Guix mainline's commons-csv 1.4."
#:home-page "https://commons.apache.org/proper/commons-csv/"))
(define-public java-jcommander-1.81
(maven-central-source-jar
"java-jcommander" "1.81"
"com/beust" "jcommander"
"06r8halmblwfzf3h60wc8ldcwcaxl789zg7sqxarhwnygv98lv2z"
#:inputs (list)
#:synopsis "JCommander 1.81 (adds UnixStyleUsageFormatter)"
#:description
"JCommander 1.81 -- newer than Guix mainline's 1.71 -- exposes
UnixStyleUsageFormatter and the enlarged public parameter API used
by hmftools' cider."
#:home-page "https://jcommander.org"))
(define-public java-jetbrains-annotations
(maven-central-source-jar
"java-jetbrains-annotations" "24.1.0"
"org/jetbrains" "annotations"
"1x3x58704sqzwyjsm6zx8zaipl9w0qybdpc4wsmb88mm0vna7405"
#:inputs (list)
#:synopsis "org.jetbrains.annotations package (NotNull/Nullable)"
#:description
"JetBrains @@NotNull / @@Nullable / @@Range / @@Contract
annotations in the modern @code{org.jetbrains.annotations} package
(distinct from the older @code{com.intellij:annotations}). Required
at compile-driver time by the Kotlin 2.1 backend to emit nullability
annotations on generated bytecode."))
(define-public java-reactive-streams
(maven-central-source-jar
"java-reactive-streams" "1.0.3"
"org/reactivestreams" "reactive-streams"
"1fpy44b5qxh0qc8q7znmwpdr38ycdd36i9jskddwmcf94850gd6m"
#:inputs (list)
#:synopsis "Reactive Streams API"
#:description
"Reactive Streams Publisher / Subscriber / Subscription / Processor
interfaces. A compile-time dependency of jOOQ's async DSL."
#:home-page "https://www.reactive-streams.org/"))
(define-public java-checker-qual
(maven-central-source-jar
"java-checker-qual" "3.5.0"
"org/checkerframework" "checker-qual"
"0s4k4cjsy5mk9m7l1wr0rx4gjy2k5wxrmpd2r8b5bc61jl4v8907"
#:synopsis "Checker Framework type annotations (qualifiers)"
#:description
"The Checker Framework's type qualifiers (@Nullable, @NonNull,
@IndexFor, @Pure, ...). They are declaration annotations only; the
PostgreSQL JDBC driver annotates its whole API with them and does not
mark them optional."
#:home-page "https://checkerframework.org/"
#:license license:expat))
(define-public java-postgresql
;; Installed as the published jar rather than compiled: PgJDBC's
;; optional Windows-SSPI, SCRAM and OSGi sources cannot be built in
;; this environment (waffle 1.9 needs the JAAS java.security.acl API
;; that JDK 17 removed, scram 2.1 is not on Central and scram 3.x
;; pulls saslprep + stringprep). jOOQ only needs the driver's public
;; API at compile time and never loads those code paths here.
(maven-central-jar
"java-postgresql" "42.2.20"
"org/postgresql" "postgresql"
"0kjilsrz9shymfki48kg1q84la1870ixlh2lnfw347x8mqw2k2vh"
#:synopsis "PostgreSQL JDBC driver"
#:description
"The PgJDBC driver. jOOQ's PostgresUtils compiles against
org.postgresql.util (upstream marks the dependency provided); the
driver is also the runtime JDBC bridge for Postgres-backed hmftools
deployments."
#:home-page "https://jdbc.postgresql.org/"))
(define-public java-r2dbc-spi
(maven-central-source-jar
"java-r2dbc-spi" "0.9.0.M1"
"io/r2dbc" "r2dbc-spi"
"0c3dhai35m3gqfcvh04ir9rlckyf30hzs93xd4qj86y082xlnr6s"
#:inputs (list java-reactive-streams java-jsr305)
#:synopsis "R2DBC service provider interface (SPI)"
#:description
"R2DBC (Reactive Relational Database Connectivity) SPI, referenced
at compile time from jOOQ's reactive facade."
#:home-page "https://r2dbc.io/"))
(define-public java-jooq
(maven-central-source-jar
"java-jooq" "3.15.5"
"org/jooq" "jooq"
"1s76hz4z0psfpypr37h2lk64psj00d6a6339x6lqn7x78yb2jkc1"
#:inputs (list java-reactive-streams java-r2dbc-spi java-jetbrains-annotations
java-jaxb-api java-jpa-api java-slf4j-api java-postgresql)
#:synopsis "jOOQ 3.15 runtime API and DSL"
#:description
"jOOQ is a Java library that maps relational databases into a
type-safe DSL. This artifact carries the runtime API and DSL types
that hmftools' cuppa, patient-db and downstream modules reference
at compile time."
#:home-page "https://www.jooq.org/"))
(define-public java-djl-api
(maven-central-source-jar
"java-djl-api" "0.28.0"
"ai/djl" "api"
"0ywdnyhkpp5xgnmkxnkamxq3p3h1kf5zv7pp3mxzl56895qhnz05"
#:inputs (list java-slf4j-api java-gson-2.8.6 java-jna java-commons-compress)
#:synopsis "AWS Deep Java Library (DJL) core API"
#:description
"DJL is an open-source, engine-agnostic Java framework for deep
learning. This artifact provides the runtime-independent NDArray
tensor API, model-loading facade, translator interfaces and
inference plumbing consumed at compile time by hmftools' v-chord
and v-cuppa modules. The actual PyTorch execution engine (
pytorch-engine, pytorch-jni, pytorch-native-cpu) is a runtime-scope
dependency in the upstream pom and is not required to compile: end
users who want to run v-chord / v-cuppa must install a compatible
DJL PyTorch runtime separately, since DJL's native libtorch bundles
are architecture-specific and not amenable to Guix packaging."
#:home-page "https://djl.ai/"))
(define-public java-djl-pytorch-engine
(maven-central-source-jar
"java-djl-pytorch-engine" "0.28.0"
"ai/djl/pytorch" "pytorch-engine"
"0a16vl1j5n1avcp97k3w550p4nxd2q0zr9c7z7s2gmmvq9lkpcj1"
#:inputs (list java-djl-api java-slf4j-api)
;; Maven generates this from the build's version properties; the
;; sources archive does not carry it, and DJL reads it back to check
;; the bundled libtorch/jni pairing.
#:extra-resources '(("pytorch-engine.properties"
. "djl_version=0.28.0\npytorch_version=2.2.2\n"))
#:synopsis "AWS DJL PyTorch execution engine (pure Java)"
#:description
"The DJL PyTorch engine wires the platform-independent DJL API to
the platform-specific native libtorch runtime through JNI. Pair
with djl-pytorch-jni and djl-pytorch-native-cpu at runtime to
actually run neural-network inference."
#:home-page "https://djl.ai/"))
(define* (%djl-pytorch-native artifact version classifier hash
#:key
(supported '("x86_64-linux"))
(name-suffix #f))
"Return a package for the DJL PyTorch native runtime bundle
ARTIFACT/VERSION with the given CLASSIFIER (e.g. \"linux-x86_64\").
DJL upstream ships one such classifier-suffixed jar per platform,
each embedding platform-specific libtorch_cpu / libtorch / libc10
shared libraries."
(package
(name (or name-suffix
(string-append "java-djl-" artifact "-" classifier)))
(version version)
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/ai/djl/pytorch/"
artifact "/" version
"/" artifact "-" version "-" classifier ".jar"))
(file-name (string-append
artifact "-" version "-" classifier ".jar"))
(sha256 (base32 hash))))
(build-system trivial-build-system)
(arguments
(list
#:modules '((guix build utils))
#:builder
#~(begin
(use-modules (guix build utils))
(let ((dest (string-append #$output "/share/java")))
(mkdir-p dest)
(copy-file #$(package-source this-package)
(string-append
dest "/"
#$artifact "-" #$version "-"
#$classifier ".jar"))))))
(supported-systems supported)
(home-page "https://djl.ai/")
(synopsis "Bundled libtorch CPU native runtime for AWS DJL")
(description
"Prebuilt libtorch_cpu, libtorch and libc10 shared libraries plus
DJL's native loader metadata, packaged as a classifier-suffixed Maven
Central jar. DJL's PyTorch JNI extracts and dlopens the bundled .so
files on first tensor call.")
(license license:asl2.0)))
(define-public java-djl-pytorch-jni
;; pytorch-jni carries the Java JNI bindings. The version tag is
;; two-part upstream: <pytorch-version>-<djl-version>.
(maven-central-jar
"java-djl-pytorch-jni" "2.2.2-0.28.0"
"ai/djl/pytorch" "pytorch-jni"
"068qviakfc4y86g9p42l0384glxlw0jn2lp99ihkjrb9mlqiy5w8"
#:synopsis "AWS DJL PyTorch JNI Java bindings"
#:description
"Java Native Interface bindings that bridge DJL's PyTorch engine
to the native libtorch shared library. Contains no native code
itself; requires djl-pytorch-native-<platform> at runtime to
resolve libtorch."
#:home-page "https://djl.ai/"))
(define-public java-djl-pytorch-native-cpu
;; The upstream 'pytorch-native-cpu' artifact only ships classifiers
;; for linux-x86_64 (and osx-*, win-x86_64) at v2.2.2 -- there is
;; no linux-aarch64 build here.
(%djl-pytorch-native
"pytorch-native-cpu" "2.2.2" "linux-x86_64"
"0wkwr395p6r58511x2byxs3na3awa8b26l23p5269fhbib9gz0wl"
#:supported '("x86_64-linux")
#:name-suffix "java-djl-pytorch-native-cpu"))
(define-public java-djl-pytorch-native-cpu-osx-x86_64
;; macOS Intel classifier. Bundles libtorch_cpu.dylib built for
;; x86_64 Darwin. Guix mainline does not currently target Darwin,
;; so this package's supported-systems list will not match a
;; typical Linux 'guix build'; it is provided as a self-contained
;; definition for users running an experimental Guix-on-Darwin
;; port and for aarch64-mac (Rosetta) fallback.
(%djl-pytorch-native
"pytorch-native-cpu" "2.2.2" "osx-x86_64"
"00yazss8j7bbvpyhxsvw9dq445w0fn0rp42wfpk3vsg96xwgbrv5"
#:supported '("x86_64-darwin")))
(define-public java-djl-pytorch-native-cpu-osx-aarch64
;; macOS Apple Silicon classifier. Bundles libtorch_cpu.dylib
;; built for aarch64 Darwin (M1/M2/...). Same experimental-Darwin
;; caveat as -osx-x86_64.
(%djl-pytorch-native
"pytorch-native-cpu" "2.2.2" "osx-aarch64"
"175rw5fkysq9kmbz3cf2x7w93i8yc63gm8jhiknvxwqssmmh6sl5"
#:supported '("aarch64-darwin")))
(define-public java-djl-pytorch-native-cpu-win-x86_64
;; Windows x64 classifier. Bundles libtorch_cpu.dll built for
;; the MSVC runtime. Guix mainline does not target Windows; this
;; package is provided as a self-contained definition for Guix-
;; on-Windows / mingw ports and for downstream reuse via 'guix
;; download'.
(%djl-pytorch-native
"pytorch-native-cpu" "2.2.2" "win-x86_64"
"1rr4ims2d2zs64bvccys7x4a6gc51pdxi7s20zhjvpxw1gxfdsrn"
#:supported '("x86_64-w64-mingw32")))
(define-public java-djl-pytorch-native-cu121-linux-x86_64
;; NVIDIA CUDA 12.1 GPU classifier for linux x86_64. Bundles a
;; CUDA-enabled libtorch_cuda*.so plus cuBLAS / cuDNN / cuFFT
;; runtime blobs -- ~2.3 GiB store item. Users must still have a
;; compatible NVIDIA driver + CUDA userspace on their host system
;; for DJL to actually schedule kernels.
(%djl-pytorch-native
"pytorch-native-cu121" "2.2.2" "linux-x86_64"
"0a6glyyyx5mhisvkgfa3f00q68fnl1r6cg7fbqwcai6rjnk163rk"
#:supported '("x86_64-linux")))
(define-public java-djl-pytorch-native-cu121-win-x86_64
;; NVIDIA CUDA 12.1 GPU classifier for Windows x64. Same runtime
;; caveats as -cu121-linux-x86_64 but with libtorch_cuda*.dll for
;; the MSVC platform. Guix mainline does not target Windows;
;; provided as a mirror definition for downstream reuse.
(%djl-pytorch-native
"pytorch-native-cu121" "2.2.2" "win-x86_64"
"0czadvjlcaa8z5s5nyg2z1pbg9w25x1bb0d121n0s6h3ca7yw5nc"
#:supported '("x86_64-w64-mingw32")))
(define-public java-djl-pytorch-native-cpu-precxx11-linux-aarch64
;; Upstream ships pytorch-native-cpu-precxx11-<ver>-linux-aarch64
;; (built against the pre-C++11 libstdc++ ABI) as the aarch64
;; counterpart of pytorch-native-cpu. This is safe here because
;; Java crosses the C JNI boundary, not libstdc++. Guix aarch64
;; users who want to actually execute java-v-chord or java-v-cuppa
;; install this package alongside them and add it to their profile
;; classpath.
(%djl-pytorch-native
"pytorch-native-cpu-precxx11" "2.2.2" "linux-aarch64"
"1sv9fjn6p7cywpw0mhsmmidbf1yp4nsb38lr8baylrqy8iz4cmjx"
#:supported '("aarch64-linux")))
(define-public java-google-guice
(maven-central-source-jar
"java-google-guice" "7.0.0"
"com/google/inject" "guice"
"0cx965ppagsq7n01a3xz7ic5j428667rc66455zffrh0fb9qsqil"
#:inputs (list java-guava java-jakarta-inject java-aopalliance java-error-prone-annotations java-asm-9)
#:synopsis "Google Guice dependency-injection framework"
#:description
"Google Guice provides compile-time-safe dependency injection
for Java. Used by hmftools bam-tools as a lightweight DI container
for its per-task pipeline components."))
(define-public java-bcprov-jdk15on
(maven-central-source-jar
"java-bcprov-jdk15on" "1.53"
"org/bouncycastle" "bcprov-jdk15on"
"0dv1rg998gcvndrdgpr8ddqx76jkx59ndb77cprchaqxvgbs8p9m"
#:inputs (list java-junit)
#:synopsis "Bouncy Castle 1.53 crypto provider (JDK 1.5+)"
#:description
"The Bouncy Castle 1.53 crypto provider, pinned to the version
consumed by hmftools' hmf-id-generator for its hashing / anonymisation
routines."
#:home-page "https://www.bouncycastle.org/"
#:license license:x11))
(define-public java-bcpkix-jdk15on
(maven-central-source-jar
"java-bcpkix-jdk15on" "1.53"
"org/bouncycastle" "bcpkix-jdk15on"
"0w35dm6hxd4rkzs56wgr69aq2ipnbyr3dbsixsdyix9cn9c37yxd"
#:inputs (list java-bcprov-jdk15on)
#:synopsis "Bouncy Castle PKIX/CMS/OCSP/TSP/EAC library"
#:description
"bcpkix-jdk15on adds the CMS, PKIX, OCSP and TSP layers on top of
bcprov. iText 7's public-key security handler (used by ORANGE's PDF
report signing/encryption path) compiles against org.bouncycastle.cms,
which bcprov does not carry."
#:home-page "https://www.bouncycastle.org/java.html"
#:license license:expat))
(define-public java-bcprov-jdk15on-1.68
(maven-central-source-jar
"java-bcprov-jdk15on-1.68" "1.68"
"org/bouncycastle" "bcprov-jdk15on"
"0w5kiw42habig4q6sg8j8diib1yaj5pfxjvznfiy6ymffgfmgfyr"
#:inputs (list java-junit)
#:synopsis "Bouncy Castle 1.68 provider (for PDFBox 2.0.30 / 3.0.6)"
#:description
"PDFBox 2.0.30 and 3.0.6 call ASN1Encodable.encodeTo(OutputStream,
ASN1Encoding) and use the 1.6x CMS API, which the 1.53 line that
iText 7.1.5 compiles against does not provide. The two versions only
meet inside PDFBox's optional public-key encryption code; report
generation never triggers it."
#:home-page "https://www.bouncycastle.org/java.html"
#:license license:expat))
(define-public java-bcpkix-jdk15on-1.68
(maven-central-source-jar
"java-bcpkix-jdk15on-1.68" "1.68"
"org/bouncycastle" "bcpkix-jdk15on"
"0xx8i9yqm4nkkd8b9k5afarh509zfwiqf56fvnkp7yr63id55x1p"
#:inputs (list java-bcprov-jdk15on-1.68)
#:synopsis "Bouncy Castle 1.68 PKIX/CMS library (for PDFBox)"
#:description
"PKIX/CMS/OCSP layer of Bouncy Castle 1.68, matching
java-bcprov-jdk15on-1.68 for PDFBox's certificate-based encryption
support."
#:home-page "https://www.bouncycastle.org/java.html"
#:license license:expat))
(define-public java-selenium-java
(maven-central-jar
"java-selenium-java" "3.14.0"
"org/seleniumhq/selenium" "selenium-java"
"02q27sa4a93xjh06vqvb5g6mhlryvn47v5dn7nvsay4y35a4ji38"
#:synopsis "Selenium WebDriver aggregator, version 3.14"
#:description
"The aggregate selenium-java artifact, referenced from hmftools'
hmf-id-generator declared classpath. Actual browser-driving code is
not used at compile time in hmftools."
#:home-page "https://www.selenium.dev/"))
(define-public java-jts-core
(maven-central-source-jar
"java-jts-core" "1.16.1"
"org/locationtech/jts" "jts-core"
"0lml29bmkg9lgnqgv6mvvvaaczlymc0vh3wr1w9i780g5c5djvrv"
#:synopsis "JTS Topology Suite (OGC geometry model)"
#:description
"JTS provides the OGC Simple Features geometry model and
operations. H2 compiles its GEOMETRY data type (ValueGeometry,
EWKBUtils) against it; upstream treats the dependency as optional at
runtime but not at compile time."
#:home-page "https://github.com/locationtech/jts"
#:license license:epl2.0))
(define-public java-h2database
;; Pinned to 1.4.200 (not 2.x): jOOQ 3.15 uses INFORMATION_SCHEMA
;; queries that fail against H2 2.x's stricter varchar-precision
;; validation.
;;
;; Not built through maven-central-source-jar: H2's sources jar is
;; missing org/h2/util/JSR310Utils.java, which upstream's build
;; generates. The tree nevertheless carries the generated file for
;; the java8 profile (h2/src/java8/src), so we fetch the tag and
;; compile both source roots together.
(package
(name "java-h2database")
(version "1.4.200")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/h2database/h2database")
(commit (string-append "version-" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1qdsw0ldy8rblkdipaysyhbb5jpb8f40pyica6czk8rfcbdnvzpm"))))
(build-system ant-build-system)
(arguments
(list #:jar-name (string-append "h2-" version "-1.4.200.jar")
#:source-dir "build-src"
#:jdk openjdk17
#:tests? #f
#:phases
#~(modify-phases %standard-phases
;; Merge the main and java8 source roots (each contains an
;; 'org' directory), then drop the bridges whose
;; dependencies we do not ship: the OSGi data-source
;; factory and the Lucene-backed full-text index.
(add-after 'unpack 'prepare-source-tree
(lambda _
(mkdir-p "build-src")
(for-each
(lambda (tree)
(when (file-exists? tree)
(copy-recursively tree "build-src")))
'("h2/src/main" "h2/src/java8/src"))
(for-each delete-file
(find-files "build-src"
"^(OsgiDataSourceFactory|OsgiDataSource|DbDriverActivator|FullTextLucene.*|WebServlet|DbStarter)\\.java$")))))))
(inputs (list java-slf4j-api java-jts-core))
(home-page "https://h2database.com/")
(synopsis "H2 embedded SQL database")
(description
"H2 is a small pure-Java relational database. Used by jOOQ's
DDLDatabase as an in-memory execution engine so a CREATE TABLE
script can be interpreted without a running database server. The
OSGi data-source bridge and the Lucene-backed full-text index are
pruned: neither is reachable from DDLDatabase and their
dependencies are not packaged.")
(license license:mpl2.0)))
(define-public java-istack-commons-runtime
(maven-central-source-jar
"java-istack-commons-runtime" "3.0.12"
"com/sun/istack" "istack-commons-runtime"
"14bms23pb8mcvm5a4qw957yp5bh25h8xiagxpnvnfh3l4qpzqwb6"
#:inputs (list java-jakarta-activation)
#:synopsis "GlassFish istack commons runtime"
#:description
"Small utility library used at runtime by the GlassFish JAXB
implementation."))
(define-public java-txw2
(maven-central-source-jar
"java-txw2" "2.3.9"
"org/glassfish/jaxb" "txw2"
"0bhxvhbbnpfgzfbllflcq403wjirbi8mn77hyns6mkm3n6lnqyff"
#:inputs (list)
#:synopsis "Typed XML writer, GlassFish TXW2"
#:description
"Runtime companion of GlassFish JAXB; emits XML from a typed
Java model."))
(define-public java-fastinfoset
(maven-central-source-jar
"java-fastinfoset" "1.2.18"
"com/sun/xml/fastinfoset" "FastInfoset"
"0i39zrihl77xk6rharmcpayz8gnvrj15hl7g08ps9cmhl2x40017"
#:synopsis "Fast Infoset (binary XML) implementation for StAX"
#:description
"Fast Infoset is the ITU-T binary XML encoding. JAXB's runtime
(jaxb-runtime) links against it for the FastInfoset StAX reader and
writer; upstream marks the dependency optional but the classes are
referenced unconditionally in the runtime's marshaller setup."
#:home-page "https://github.com/eclipse-ee4j/jaxb-fi"
#:license license:asl2.0))
(define-public java-jaxb-runtime
(maven-central-source-jar
"java-jaxb-runtime" "2.3.9"
"org/glassfish/jaxb" "jaxb-runtime"
"01n65xqmv3z7n8wvsq3v15ll2mrpr2mm3rbsy024prrzmh14qn0g"
#:inputs (list java-jaxb-api java-istack-commons-runtime java-txw2
java-jakarta-activation java-stax-ex java-fastinfoset)
#:synopsis "GlassFish JAXB 2.3 runtime"
#:description
"The reference implementation of the JAXB 2.3 API. Supplies the
XML->JavaBean marshalling engine used by jOOQ codegen."))
(define-public java-jooq-meta
(maven-central-source-jar
"java-jooq-meta" "3.15.5"
"org/jooq" "jooq-meta"
"07yady1jrklsw6vxwr2gy0csw4syh6zh9qijjpq2hw7ykhiv7r2k"
#:inputs (list java-jooq java-jaxb-api java-reactive-streams java-r2dbc-spi)
#:synopsis "jOOQ 3.15 database schema introspection"
#:description
"jooq-meta reads database schema metadata (from JDBC or embedded
DDL) and feeds it to jooq-codegen for code generation."
#:home-page "https://www.jooq.org/"))
(define-public java-jooq-meta-extensions
(maven-central-source-jar
"java-jooq-meta-extensions" "3.15.5"
"org/jooq" "jooq-meta-extensions"
"0nn6nd9h95kzcrh6pwg3vqbggx36rvqk84zpy0bk86vxprnj5vsr"
#:inputs (list java-jooq java-jooq-meta java-jaxb-api
java-reactive-streams java-r2dbc-spi java-h2database)
#:synopsis "jOOQ meta-extensions: DDL, JPADatabase, XMLDatabase"
#:description
"Alternative schema-introspection back-ends for jooq-meta. The
DDLDatabase reads a bundle of CREATE TABLE statements from a plain
SQL file, which is how hmftools' patient-db generates its Tables
classes at build time."
#:home-page "https://www.jooq.org/"))
(define-public java-jooq-codegen
(maven-central-source-jar
"java-jooq-codegen" "3.15.5"
"org/jooq" "jooq-codegen"
"1lyrxagf5zkgrs082m40rarf8svrs8szaqn2jmcxn4y28m3c2hvi"
#:inputs (list java-jooq java-jooq-meta java-jaxb-api
java-reactive-streams java-r2dbc-spi)
#:synopsis "jOOQ 3.15 code generator"
#:description
"The command-line jOOQ code generator: given a schema and
package configuration it emits typed Tables, Records and DAO
classes."
#:home-page "https://www.jooq.org/"))
(define-public java-mysql-connector-java
(maven-central-source-jar
"java-mysql-connector-java" "8.0.16"
"mysql" "mysql-connector-java"
"1rbpbky62awvnrihzcjvmakxd4sd2zzy8cs31904xyhj6dlcqkyw"
#:inputs (list java-protobuf-java java-slf4j-api)
#:prune (list "^com/mysql/cj/jdbc/integration/")
#:synopsis "MySQL Connector/J 8.0"
#:description
"Oracle's JDBC driver for MySQL. Runtime dependency of hmftools
DAO code but only lightly referenced at compile time; ship the pre-
built jar from Maven Central."
#:home-page "https://dev.mysql.com/downloads/connector/j/"
#:license license:gpl2))
(define-public java-tablesaw-core
(maven-central-jar
"java-tablesaw-core" "0.43.1"
"tech/tablesaw" "tablesaw-core"
"0hvybpxrs10jkdg45cn1d4i4nny5q024ihp9vk7yfxj7nkh3wvhz"
#:synopsis "Tablesaw dataframe library"
#:description
"Tablesaw is a Java dataframe / statistics library. Used by
hmftools' teal for per-sample metric aggregation."
#:home-page "https://github.com/jtablesaw/tablesaw"))
(define-public java-trove4j
(maven-central-source-jar
"java-trove4j" "1.0.20200330"
"org/jetbrains/intellij/deps" "trove4j"
"10aldqj67jmfk1pk103syvhsp808r43p9dygmzgbb7lq1gl7809f"
#:inputs (list)
#:synopsis "JetBrains fork of Trove: fast primitive-typed collections"
#:description
"The JetBrains fork of GNU Trove, a high-performance primitive-
typed collection library for the JVM (TIntHashMap,
TObjectHashingStrategy and friends). It is a runtime dependency of
the Kotlin compiler."))
(define-public java-kotlin-compiler
(maven-central-jar
"java-kotlin-compiler" "2.1.0"
"org/jetbrains/kotlin" "kotlin-compiler"
"13p0icy0pb6xg5ycc41h0j85l69n7wdhkivf8hzahpd6qiv8v0zn"
#:synopsis "Full Kotlin 2.1 compiler jar (non-embeddable)"
#:description
"The Kotlin 2.1 JVM compiler, packaged as the non-embeddable jar
distributed on Maven Central. Unlike kotlin-compiler-embeddable
this artifact bundles all of the JetBrains-internal runtime deps
that K2JVMCompiler needs to actually run (Trove4j and friends), so
'java -cp kotlin-compiler.jar[:stdlib:reflect:coroutines]
org.jetbrains.kotlin.cli.jvm.K2JVMCompiler ...' works standalone.
Used by the hmftools-module helper's compile-kotlin phase."
#:home-page "https://kotlinlang.org/"))
(define-public java-kotlin-compiler-embeddable
(maven-central-jar
"java-kotlin-compiler-embeddable" "2.1.0"
"org/jetbrains/kotlin" "kotlin-compiler-embeddable"
"10rp4l6xp32s2l0wcfjcsw0s14sxnxn35ymyjagbkhsiyak3kcf1"
#:synopsis "Embeddable Kotlin 2.1 compiler (kotlinc)"
#:description
"Single-jar distribution of the Kotlin 2.1 JVM compiler, suitable
for driving 'kotlinc' inline from a build phase (main class
@code{org.jetbrains.kotlin.cli.jvm.K2JVMCompiler}). Used by the
Guix ant-build wrappers for hmftools' Kotlin modules (cider, teal)
where no separate kotlinc distribution is available."
#:home-page "https://kotlinlang.org/"))
(define-public java-kotlin-daemon-embeddable
(maven-central-jar
"java-kotlin-daemon-embeddable" "2.1.0"
"org/jetbrains/kotlin" "kotlin-daemon-embeddable"
"1b4ywbdqsnpdq94m6hig0483j8vdgx0b5djb1qw0wl63afyq39ba"
#:synopsis "Kotlin compiler daemon (embeddable)"
#:description
"Runtime hooks the Kotlin embeddable compiler dispatches through
when spawning a background compilation daemon. Not strictly
required for one-shot builds but distributed alongside the main
compiler jar."
#:home-page "https://kotlinlang.org/"))
(define-public java-kotlin-reflect
(maven-central-jar
"java-kotlin-reflect" "2.1.0"
"org/jetbrains/kotlin" "kotlin-reflect"
"1cl8q17iy1nc0vzkw2f1aqfbwx59mlc2vh9c6yicza4qzbnhixmm"
#:synopsis "Kotlin reflection API"
#:description
"Full runtime reflection support for Kotlin: KClass, KProperty,
KFunction. Consumed by hmftools' cider and teal (and by the Kotlin
compiler itself when @@Metadata attributes are inspected)."
#:home-page "https://kotlinlang.org/"))
(define-public java-kotlinx-coroutines-core-jvm
(maven-central-jar
"java-kotlinx-coroutines-core-jvm" "1.10.0"
"org/jetbrains/kotlinx" "kotlinx-coroutines-core-jvm"
"16j25krgkp1vhqbxvnd98l3ynf60vzvl4h35xjhjd9nzjc4kmxkm"
#:synopsis "Kotlin coroutines runtime (JVM target)"
#:description
"JVM build of the Kotlin coroutines runtime library."
#:home-page "https://github.com/Kotlin/kotlinx.coroutines"))
(define-public java-kotlinx-coroutines-core
(maven-central-jar
"java-kotlinx-coroutines-core" "1.10.0"
"org/jetbrains/kotlinx" "kotlinx-coroutines-core"
"06iamw3dfl53hs3rqa9z2dvww0fl7ngiy3sdw1jh6gdd04dr2d2c"
#:synopsis "Kotlin coroutines core (common)"
#:description
"Multiplatform 'common' facade jar for kotlinx.coroutines. Real
runtime code lives in kotlinx-coroutines-core-jvm; this artifact
carries the metadata that Maven/Gradle need to resolve the target."
#:home-page "https://github.com/Kotlin/kotlinx.coroutines"))
(define-public java-itext-io
(maven-central-source-jar
"java-itext-io" "7.1.5"
"com/itextpdf" "io"
"0c6b4afqsrrcnvzxd92lxcg1ccx7z5a97az0vcj2c3vbwry872zs"
#:inputs (list java-slf4j-api java-bcprov-jdk15on)
#:synopsis "iText 7 low-level I/O module"
#:description "Low-level byte, font and image utilities used by
the iText 7 PDF library. Consumed by hmftools ORANGE for PDF
report generation."
#:home-page "https://itextpdf.com/"
#:license license:agpl3+))
(define-public java-itext-kernel
(maven-central-source-jar
"java-itext-kernel" "7.1.5"
"com/itextpdf" "kernel"
"0j20nd0qbpqy3nlkwlkm6bjd1nxx2l3013wn023phb7y06v6w0xp"
#:inputs (list java-itext-io java-slf4j-api java-bcprov-jdk15on
java-bcpkix-jdk15on)
#:synopsis "iText 7 kernel (PDF object model)"
#:description "The kernel module of the iText 7 PDF library:
low-level PdfDocument, PdfPage, PdfStream types."
#:home-page "https://itextpdf.com/"
#:license license:agpl3+))
(define-public java-itext-layout
(maven-central-source-jar
"java-itext-layout" "7.1.5"
"com/itextpdf" "layout"
"03ni2q93c8v2kq24r7abd6pdhz0wp953jmv51c0ln64nmbwqw738"
#:inputs (list java-itext-kernel java-itext-io java-slf4j-api)
#:synopsis "iText 7 layout engine"
#:description "High-level element / layout API for iText 7
(Document, Paragraph, Table, ...). hmftools ORANGE assembles its
clinical PDF report using these primitives."
#:home-page "https://itextpdf.com/"
#:license license:agpl3+))
(define-public java-fontbox
(maven-central-source-jar
"java-fontbox" "2.0.30"
"org/apache/pdfbox" "fontbox"
"1zfzws5yjp7jfhi5w3cwqxgbzfhvws8z2bljbapz75sp2wh8fxzb"
#:inputs (list java-commons-logging)
#:synopsis "Font parsing library used by Apache PDFBox"
#:description
"FontBox is a subproject of Apache PDFBox that provides parsers
for the various font formats (Type1, TrueType, OpenType, CFF)
embedded in PDF documents."
#:home-page "https://pdfbox.apache.org/"))
(define-public java-pdfbox
(maven-central-source-jar
"java-pdfbox" "2.0.30"
"org/apache/pdfbox" "pdfbox"
"0h6z6aikimfqpwqr94acc4cwkc6cbab8ms7p1wd7ghd40cw5gnym"
#:inputs (list java-fontbox java-commons-logging
java-bcprov-jdk15on-1.68 java-bcpkix-jdk15on-1.68)
#:synopsis "Apache PDFBox 2.x PDF manipulation library"
#:description
"Apache PDFBox is a Java library for working with PDF documents:
extracting text, filling forms, merging and splitting PDFs. Used
by hmftools qsee and by the ORANGE report generator."
#:home-page "https://pdfbox.apache.org/"))
;; PDFBox 3.x trio. ORANGE 5.1 renders its report through boxable
;; 1.8.2, which is compiled against PDFBox 3.0.6 -- the 2.x API above
;; is not source/binary compatible with it. qsee keeps using 2.0.30
;; (now under the org.apache.pdfbox.io / .multipdf planes it imports
;; directly).
(define-public java-pdfbox-io-3
(maven-central-source-jar
"java-pdfbox-io-3" "3.0.6"
"org/apache/pdfbox" "pdfbox-io"
"1a3nl239x7pp329fg5bcd7zzqpmvpq4n1880xkp5kl55avarymcv"
#:inputs (list java-commons-logging)
#:synopsis "Apache PDFBox 3 scratch-file and random-access I/O layer"
#:description
"pdfbox-io carries PDFBox 3's RandomAccessRead/Write and
scratch-file implementations (org.apache.pdfbox.io), split out of
the main pdfbox artifact in 3.x."
#:home-page "https://pdfbox.apache.org/"))
(define-public java-fontbox-3
(maven-central-source-jar
"java-fontbox-3" "3.0.6"
"org/apache/pdfbox" "fontbox"
"171jza5npiwdg6ydcngh015vq2qmh0rn2d0xsn7zwpm5kpq01l9v"
#:inputs (list java-commons-logging java-pdfbox-io-3)
#:synopsis "Font parsing library used by Apache PDFBox 3"
#:description
"FontBox is a subproject of Apache PDFBox that provides parsers
for the various font formats (Type1, TrueType, OpenType, CFF)
embedded in PDF documents. 3.x line, matching java-pdfbox-3."
#:home-page "https://pdfbox.apache.org/"))
(define-public java-pdfbox-3
(maven-central-source-jar
"java-pdfbox-3" "3.0.6"
"org/apache/pdfbox" "pdfbox"
"0lv9cfdhscdd2ilk2x7w7yal2z8bfndpilghvhqgj1hbasmpqk1w"
#:inputs (list java-pdfbox-io-3 java-fontbox-3 java-commons-logging
java-bcprov-jdk15on-1.68 java-bcpkix-jdk15on-1.68)
#:synopsis "Apache PDFBox 3.x PDF manipulation library"
#:description
"Apache PDFBox is a Java library for working with PDF documents:
extracting text, filling forms, merging and splitting PDFs. Used
directly by hmftools ORANGE (PDDocument / PDPageContentStream) and
through java-boxable."
#:home-page "https://pdfbox.apache.org/"))
(define-public java-jsoup
(maven-central-source-jar
"java-jsoup" "1.15.3"
"org/jsoup" "jsoup"
"0ql2h8c37bjg9wj170dr0zv835g0wm0jgsdg1pvwxws9qvjpv523"
#:inputs (list java-jsr305)
#:synopsis "jsoup HTML parser, DOM and CSS-selector library"
#:description
"jsoup parses HTML into a DOM, applies CSS selectors and cleans
user-supplied markup. boxable (ORANGE's PDF table renderer) uses it
to render HTML-formatted cell content. Guix mainline has jsoup 1.10.3
in (gnu packages java) but does not export it."
#:home-page "https://jsoup.org/"
#:license license:expat))
(define-public java-boxable
(maven-central-source-jar
"java-boxable" "1.8.2"
"com/github/dhorions" "boxable"
"0bkxrn706wr37mpibv9xi0bjkiwwq1c1638cy587v1kskrrgh7ql"
#:inputs (list java-pdfbox-3 java-slf4j-api java-jsoup)
#:prune (list "^be/quodlibet/boxable/datatable/")
#:synopsis "Table-drawing helper library for Apache PDFBox"
#:description
"boxable (be.quodlibet.boxable) draws tables and cells into a
PDFBox document. ORANGE uses it for the tabular sections of its
clinical PDF report; it is compiled against PDFBox 3.x, so pair it
with java-pdfbox-3 rather than java-pdfbox."
#:home-page "https://github.com/dhorions/boxable"
#:license license:asl2.0))
(define-public java-javapoet
(maven-central-source-jar
"java-javapoet" "0.5.0"
"com/palantir/javapoet" "javapoet"
"0jd5axd459xqb5bgrjl5q0rn4857p7caqjx6536cg262wwri47hz"
#:inputs (list)
#:synopsis "Palantir fork of JavaPoet source-file generator"
#:description
"JavaPoet is a Java library for generating .java source files
programmatically. The Palantir fork (com.palantir.javapoet) is a
runtime dependency of io.soabase.record-builder's annotation
processor: without it on the classpath, javac cannot instantiate
the RecordBuilderProcessor and no builders are emitted."
#:home-page "https://github.com/palantir/javapoet"))
(define-public java-jspecify
(package
(name "java-jspecify")
(version "1.0.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/jspecify/jspecify")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1vrn2r5dl8sqny7zhaqsg6qm8yyd3rjl2fn3g168i5dxd5l521as"))))
(build-system ant-build-system)
(arguments
;; ElementType.MODULE is a Java 9+ enum constant; icedtea-8's
;; javac (the ant-build-system default) does not have it.
`(#:jdk ,openjdk17
#:jar-name "jspecify.jar"
#:source-dir "src/main/java"
#:tests? #f))
(home-page "https://jspecify.dev/")
(synopsis "Standard nullness annotations for Java")
(description
"JSpecify defines a small set of standard nullness annotations
(@code{@@Nullable}, @code{@@NonNull}, @code{@@NullMarked},
@code{@@NullUnmarked}) usable across Java tooling for static null-
safety analysis. Used by hmftools' finding-datamodel and related
modules.")
(license license:asl2.0)))
(define-public java-record-builder-core
;; Compile-time (Maven 'provided') annotation API for the
;; record-builder processor. The upstream io.soabase.record-builder
;; project is a small multi-module Maven build. Install the pre-
;; built jar from Maven Central directly, matching the pattern used
;; for the immutables artifacts.
(package
(name "java-record-builder-core")
(version "51")
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/io/soabase/"
"record-builder/record-builder-core/" version
"/record-builder-core-" version ".jar"))
(sha256
(base32
"01shbq14wkzmn6n76am032cmc19p0078lbak185kzc0my3v0fxj0"))))
(build-system trivial-build-system)
(arguments
(list
#:modules '((guix build utils))
#:builder
#~(begin
(use-modules (guix build utils))
(let ((dest (string-append #$output "/share/java")))
(mkdir-p dest)
(copy-file #$(package-source this-package)
(string-append dest "/record-builder-core-"
#$version ".jar"))))))
(home-page "https://github.com/Randgalt/record-builder")
(synopsis "Compile-time annotations for the RecordBuilder generator")
(description
"Compile-time (@code{provided}) API classes -- primarily the
@code{@@RecordBuilder} annotation -- consumed by the RecordBuilder
annotation processor to emit builders and wither methods for Java
records. Used by hmftools' finding-datamodel.")
(license license:asl2.0)))
(define-public java-record-builder-processor
(package
(inherit java-record-builder-core)
(name "java-record-builder-processor")
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/io/soabase/"
"record-builder/record-builder-processor/"
(package-version java-record-builder-core)
"/record-builder-processor-"
(package-version java-record-builder-core)
".jar"))
(sha256
(base32
"06n9w716x7qv5c3gxl0h5r0095qz8jf03sydhyxg2a3d0b1x1fpy"))))
(arguments
(list
#:modules '((guix build utils))
#:builder
#~(begin
(use-modules (guix build utils))
(let ((dest (string-append #$output "/share/java")))
(mkdir-p dest)
(copy-file #$(package-source this-package)
(string-append dest "/record-builder-processor-"
#$(package-version
java-record-builder-core)
".jar"))))))
(synopsis "Annotation processor that emits Java record builders")
(description
"The RecordBuilder annotation processor generates builder and
wither implementations for record types annotated with
@code{@@RecordBuilder}. Runs at compile time via
@code{-processorpath} / classpath auto-discovery.")))
(define-public java-jakarta-validation-api
;; Compile-time bean-validation annotation API (@@NotNull, @@Size,
;; @@Pattern...). Install the reference-implementation jar from
;; Maven Central verbatim; a from-source ant build would need
;; jakarta-el and other transitive Maven-parent scaffolding.
(package
(name "java-jakarta-validation-api")
(version "3.0.2")
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/jakarta/"
"validation/jakarta.validation-api/" version
"/jakarta.validation-api-" version ".jar"))
(sha256
(base32
"1j8z5jv03sa6c7cw50jldikkfz3dpyp6nk3dv7msgihcj7k2a719"))))
(build-system trivial-build-system)
(arguments
(list
#:modules '((guix build utils))
#:builder
#~(begin
(use-modules (guix build utils))
(let ((dest (string-append #$output "/share/java")))
(mkdir-p dest)
(copy-file #$(package-source this-package)
(string-append dest
"/jakarta.validation-api-"
#$version ".jar"))))))
(home-page "https://beanvalidation.org/")
(synopsis "Jakarta Bean Validation API")
(description
"The Jakarta Bean Validation API defines a metadata model and
API for JavaBean and method validation. hmftools' finding-datamodel
uses it (transitionally, alongside JSpecify) for its TypeScript-
generator schema constraints.")
(license license:asl2.0)))
(define-public java-immutables-gson
;; Companion artifact to java-immutables-value: provides the
;; @@Gson.TypeAdapters compile-time annotation and matching processor
;; that emits Gson TypeAdapterFactory implementations for
;; @@Value.Immutable types. Same shade-avoidance shortcut as its
;; sibling: fetch the Apache-2.0 pre-built jar from Maven Central.
(package
(name "java-immutables-gson")
(version "2.9.3")
(source (origin
(method url-fetch)
(uri (string-append
"https://repo.maven.apache.org/maven2/org/immutables/"
"gson/" version "/gson-" version ".jar"))
(sha256
(base32
"14x35n8p57sdv6qf6xc0z4gfisxnfdlp69p9qid65fap0mjvc96z"))))
(build-system trivial-build-system)
(arguments
(list
#:modules '((guix build utils))
#:builder
#~(begin
(use-modules (guix build utils))
(let ((dest (string-append #$output "/share/java")))
(mkdir-p dest)
(copy-file #$(package-source this-package)
(string-append dest
"/immutables-gson-" #$version
".jar"))))))
(home-page "https://immutables.github.io/typeadapters.html")
(synopsis "Gson TypeAdapters generator for Immutables value types")
(description
"Companion annotation processor to org.immutables:value. Given
an @@Value.Immutable interface annotated with @@Gson.TypeAdapters, it
emits a matching TypeAdapterFactory so the immutable type can be
serialised / deserialised by Google Gson without hand-written
adapters. Used by orange-datamodel and other JSON-serialising
hmftools data-model packages.")
(license license:asl2.0)))
(define-public java-htsjdk-2.23
;; hmftools' hmf-common pins htsjdk 2.23.0. Guix mainline's
;; java-htsjdk-latest sits at 2.14.3 with a note that any newer
;; release requires Gradle to build; the ant-build-system recipe
;; below inherits java-htsjdk-latest's phase set (which already
;; discards the deprecation-stub build.xml and the Scala test tree)
;; and just bumps to the 2.23.0 source tag. htsjdk still targets
;; Java 1.8 bytecode, so building under icedtea-8 is safe; consumers
;; run it under openjdk17 at runtime.
(package
(inherit java-htsjdk-latest)
(name "java-htsjdk")
(version "2.23.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/samtools/htsjdk")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1d57pyy6j8pb0y8k8fv0m5dxynxflwx8f151c25adhsav16ad8jl"))))))
|