more sbt dependencies
more/packages/java.scm
6722 | 6722 | (description "") | |
6723 | 6723 | (license license:asl2.0))) | |
6724 | 6724 | ||
6725 | + | (define-public java-okhttp-urlconnection | |
6726 | + | (package | |
6727 | + | (inherit java-okhttp) | |
6728 | + | (name "java-okhttp-urlconnection") | |
6729 | + | (arguments | |
6730 | + | `(#:jar-name "okhttp.jar" | |
6731 | + | #:source-dir "okhttp-urlconnection/src/main/java" | |
6732 | + | #:test-dir "okhttp-urlconnection/src/test" | |
6733 | + | ;; TODO: require okhttp-mockwebserver | |
6734 | + | #:tests? #f)) | |
6735 | + | (inputs | |
6736 | + | `(("java-okhttp" ,java-okhttp) | |
6737 | + | ,@(package-inputs java-okhttp))))) | |
6738 | + | ||
6725 | 6739 | (define-public java-config | |
6726 | 6740 | (package | |
6727 | 6741 | (name "java-config") | |
… | |||
6947 | 6961 | (synopsis "") | |
6948 | 6962 | (description "") | |
6949 | 6963 | (license license:asl2.0))) | |
6964 | + | ||
6965 | + | (define-public java-sbt-ipcsocket | |
6966 | + | (package | |
6967 | + | (name "java-sbt-ipcsocket") | |
6968 | + | (version "1.0.0") | |
6969 | + | (source (origin | |
6970 | + | (method url-fetch) | |
6971 | + | (uri (string-append "https://github.com/sbt/ipcsocket/archive/v" | |
6972 | + | version ".tar.gz")) | |
6973 | + | (sha256 | |
6974 | + | (base32 | |
6975 | + | "0zqg1c10dwjzvqb9wngmprs2cfiyw3n1jq8ag0hwk978f1d93a4h")))) | |
6976 | + | (build-system ant-build-system) | |
6977 | + | (arguments | |
6978 | + | `(#:jar-name "ipcsocket.jar" | |
6979 | + | #:source-dir "src/main/java" | |
6980 | + | ;; Cannot create unix domain socket properly in the build environment | |
6981 | + | #:tests? #f)) | |
6982 | + | (inputs | |
6983 | + | `(("java-native-access" ,java-native-access) | |
6984 | + | ("java-native-access-platform" ,java-native-access-platform))) | |
6985 | + | (home-page "") | |
6986 | + | (synopsis "") | |
6987 | + | (description "") | |
6988 | + | (license license:asl2.0))) | |
6989 | + | ||
6990 | + | (define-public java-sbt-test-interface | |
6991 | + | (package | |
6992 | + | (name "java-sbt-test-interface") | |
6993 | + | (version "1.0") | |
6994 | + | (source (origin | |
6995 | + | (method url-fetch) | |
6996 | + | (uri (string-append "https://github.com/sbt/test-interface/archive/v" | |
6997 | + | version ".tar.gz")) | |
6998 | + | (sha256 | |
6999 | + | (base32 | |
7000 | + | "0lqsaik33d7wfq8d69mq4s6jb16rb2fmnhv2wjqisrxi0m4nmffw")))) | |
7001 | + | (build-system ant-build-system) | |
7002 | + | (arguments | |
7003 | + | `(#:jar-name "test-interface.jar" | |
7004 | + | #:source-dir "src/main/java" | |
7005 | + | ;; TODO: tests are written in scala | |
7006 | + | #:tests? #f)) | |
7007 | + | (home-page "") | |
7008 | + | (synopsis "") | |
7009 | + | (description "") | |
7010 | + | (license license:asl2.0))) | |
7011 | + | ||
7012 | + | (define-public java-caffeine | |
7013 | + | (package | |
7014 | + | (name "java-caffeine") | |
7015 | + | (version "2.6.2") | |
7016 | + | (source (origin | |
7017 | + | (method url-fetch) | |
7018 | + | (uri (string-append "https://github.com/ben-manes/caffeine/archive/v" | |
7019 | + | version ".tar.gz")) | |
7020 | + | (sha256 | |
7021 | + | (base32 | |
7022 | + | "1kaxz4fpjpgyv4n2zhlb3q0f8mn5ji68wilzwhf9dsbq4l12zkx4")))) | |
7023 | + | (build-system ant-build-system) | |
7024 | + | (arguments | |
7025 | + | `(#:jar-name "caffeine.jar" | |
7026 | + | #:source-dir "caffeine/src/main/java" | |
7027 | + | #:phases | |
7028 | + | (modify-phases %standard-phases | |
7029 | + | (add-before 'build 'generate-javapoet | |
7030 | + | (lambda _ | |
7031 | + | (mkdir-p "build/javapoet") | |
7032 | + | (apply invoke "javac" "-cp" (getenv "CLASSPATH") | |
7033 | + | "-d" "build/javapoet" | |
7034 | + | (find-files "caffeine/src/javaPoet" ".*.java$")) | |
7035 | + | #t))))) | |
7036 | + | (inputs | |
7037 | + | `(("java-jsr305" ,java-jsr305) | |
7038 | + | ("java-javapoet" ,java-javapoet))) | |
7039 | + | (home-page "") | |
7040 | + | (synopsis "") | |
7041 | + | (description "") | |
7042 | + | (license license:asl2.0))) |
more/packages/scala.scm
84 | 84 | ||
85 | 85 | ;; TODO: put it in guix/build/java-utils.scm | |
86 | 86 | ;; TODO: remove contraband-* directories and regenerate them from contraband/ | |
87 | - | (define (sbt-building-phase subprojects) | |
87 | + | (define* (sbt-building-phase subprojects #:optional (kind-projector? #f)) | |
88 | 88 | `(lambda* (#:key inputs #:allow-other-keys) | |
89 | 89 | (define (build-subproject prefix name) | |
90 | 90 | (let ((build-directory (string-append "build/" name)) | |
91 | + | (kind-projector (assoc-ref inputs "scala-kind-projector")) | |
91 | 92 | (jar-name (string-append | |
92 | 93 | (if (> (string-length prefix) 0) | |
93 | 94 | (string-replace prefix "-" (- (string-length prefix) 1)) | |
… | |||
119 | 120 | (find-files "build" "." #:directories? #t)) | |
120 | 121 | ":")) | |
121 | 122 | "-d" build-directory "-language:experimental.macros" | |
123 | + | (if ,kind-projector? | |
124 | + | (string-append "-Xplugin:" kind-projector | |
125 | + | "/share/java/kind-projector.jar") | |
126 | + | "") | |
122 | 127 | (append scala-files java-files))) | |
123 | 128 | (unless (eq? java-files '()) | |
124 | 129 | (apply invoke "javac" "-classpath" | |
… | |||
775 | 780 | `(#:tests? #f | |
776 | 781 | #:phases | |
777 | 782 | (modify-phases %standard-phases | |
778 | - | (replace 'build | |
779 | - | (lambda* (#:key inputs #:allow-other-keys) | |
780 | - | (mkdir-p "build/classes") | |
781 | - | (apply invoke "scalac" "-classpath" (getenv "CLASSPATH") | |
782 | - | "-d" "build/classes" | |
783 | - | (append | |
784 | - | (find-files "core/src/main/java" ".*.java$") | |
785 | - | (find-files "core/src/main/scala" ".*.scala$") | |
786 | - | (find-files "core/src/main/contraband-scala" ".*.scala$"))) | |
787 | - | (invoke "jar" "cf" "sbt-librarymanagement.jar" "-C" "build/classes" ".") | |
783 | + | (add-before 'build 'fix-sjsonnew | |
784 | + | (lambda _ | |
785 | + | (substitute* (find-files "." ".*.scala") | |
786 | + | (("sjsonnew.shaded.") "")) | |
788 | 787 | #t)) | |
788 | + | (replace 'build | |
789 | + | ,(sbt-building-phase | |
790 | + | `(("" "core") | |
791 | + | ("" "ivy")))) | |
789 | 792 | (replace 'install | |
790 | 793 | (install-jars "."))))) | |
791 | 794 | (inputs | |
792 | - | `(("sbt-launcher" ,sbt-launcher) | |
795 | + | `(("java-apache-ivy" ,java-apache-ivy) | |
796 | + | ("java-okhttp" ,java-okhttp) | |
797 | + | ("java-okhttp-urlconnection" ,java-okhttp-urlconnection) | |
798 | + | ("java-okio" ,java-okio) | |
799 | + | ("sbt-launcher" ,sbt-launcher) | |
793 | 800 | ("sbt-util" ,sbt-util) | |
794 | 801 | ("sbt-io" ,sbt-io) | |
802 | + | ("scala-jawn" ,scala-jawn) | |
795 | 803 | ("scala-okhttp" ,scala-okhttp) | |
796 | - | ("scala-sjsonnew" ,scala-sjsonnew))) | |
804 | + | ("scala-scalajson" ,scala-scalajson) | |
805 | + | ("scala-sjsonnew" ,scala-sjsonnew) | |
806 | + | ("scala-sjsonnew-support-murmurhash" ,scala-sjsonnew-support-murmurhash) | |
807 | + | ("scala-sjsonnew-support-scalajson" ,scala-sjsonnew-support-scalajson))) | |
797 | 808 | (native-inputs | |
798 | 809 | `(("scala" ,scala-official))) | |
799 | 810 | (home-page "") | |
800 | 811 | (synopsis "") | |
801 | 812 | (description "") | |
802 | 813 | ;; From core/NOTICE | |
814 | + | ;; XXX: WARNING: no license in ivy/ | |
803 | 815 | (license license:bsd-2))) | |
804 | 816 | ||
805 | 817 | ;; LICENSE? | |
… | |||
1018 | 1030 | (description "") | |
1019 | 1031 | (license license:expat))) | |
1020 | 1032 | ||
1021 | - | (define-public scala-fastparse1 | |
1033 | + | (define scala-fastparse1 | |
1022 | 1034 | (package | |
1023 | 1035 | (inherit scala-fastparse) | |
1024 | 1036 | (version "1.0.0") | |
… | |||
1262 | 1274 | "--scala_out=internal/zinc-persist/src/main/scala" | |
1263 | 1275 | "internal/zinc-persist/src/main/protobuf/schema.proto") | |
1264 | 1276 | #t)) | |
1277 | + | (add-before 'build 'use-correct-class | |
1278 | + | (lambda _ | |
1279 | + | ;; Because of our way of compiling, some classes are present | |
1280 | + | ;; in excess in the classpath, and sometimes are imported | |
1281 | + | ;; instead of the correct one. e.g. is AnalysisCallback imported | |
1282 | + | ;; as xsbti.AnalysisCallback and inc.AnalysisCallback | |
1283 | + | (with-directory-excursion "internal/zinc-compile-core/src/main/scala" | |
1284 | + | (substitute* "sbt/internal/inc/AnalyzingCompiler.scala" | |
1285 | + | ((": AnalysisCallback") ": xsbti.AnalysisCallback"))) | |
1286 | + | #t)) | |
1265 | 1287 | (replace 'build | |
1266 | 1288 | ,(sbt-building-phase | |
1267 | 1289 | '(("internal/" "compiler-interface") | |
… | |||
1271 | 1293 | ("internal/" "zinc-core") | |
1272 | 1294 | ("internal/" "zinc-persist") | |
1273 | 1295 | ("internal/" "zinc-compile-core") | |
1296 | + | ("internal/" "zinc-ivy-integration") | |
1274 | 1297 | ("" "zinc")))) | |
1275 | 1298 | (replace 'install | |
1276 | 1299 | (install-jars "."))))) | |
… | |||
1293 | 1316 | (description "") | |
1294 | 1317 | (license license:bsd-3))) | |
1295 | 1318 | ||
1319 | + | (define-public scala-cache | |
1320 | + | (package | |
1321 | + | (name "scala-cache") | |
1322 | + | (version "0.27.0") | |
1323 | + | (source | |
1324 | + | (origin | |
1325 | + | (method url-fetch) | |
1326 | + | (uri (string-append "https://github.com/cb372/scalacache/archive/v" | |
1327 | + | version ".tar.gz")) | |
1328 | + | (file-name (string-append name "-" version ".tar.gz")) | |
1329 | + | (sha256 | |
1330 | + | (base32 | |
1331 | + | "0iqs1zvwr19j9k726f4zf4jzqlx5y1br87ijras668c3wd301h1k")))) | |
1332 | + | (build-system ant-build-system) | |
1333 | + | (arguments | |
1334 | + | `(#:tests? #f | |
1335 | + | #:phases | |
1336 | + | (modify-phases %standard-phases | |
1337 | + | (add-before 'build 'merge-core | |
1338 | + | (lambda _ | |
1339 | + | (copy-recursively "modules/core/jvm" "modules/core") | |
1340 | + | (copy-recursively "modules/core/shared" "modules/core") | |
1341 | + | #t)) | |
1342 | + | (replace 'build | |
1343 | + | ,(sbt-building-phase | |
1344 | + | `(("modules/" "core") | |
1345 | + | ("modules/" "caffeine")))) | |
1346 | + | (replace 'install | |
1347 | + | (install-jars "."))))) | |
1348 | + | (inputs | |
1349 | + | `(("java-caffeine" ,java-caffeine) | |
1350 | + | ("java-slf4j-api" ,java-slf4j-api))) | |
1351 | + | (native-inputs | |
1352 | + | `(("scala" ,scala-official))) | |
1353 | + | (home-page "https://www.scala-sbt.org/") | |
1354 | + | (synopsis "") | |
1355 | + | (description "") | |
1356 | + | (license license:bsd-3))) | |
1357 | + | ||
1296 | 1358 | (define-public sbt | |
1297 | 1359 | (package | |
1298 | 1360 | (name "sbt") | |
… | |||
1311 | 1373 | `(#:tests? #f | |
1312 | 1374 | #:phases | |
1313 | 1375 | (modify-phases %standard-phases | |
1376 | + | (add-before 'build 'fix-sjsonnew | |
1377 | + | (lambda _ | |
1378 | + | (substitute* (find-files "." ".*.scala") | |
1379 | + | (("sjsonnew.shaded.") "")) | |
1380 | + | #t)) | |
1314 | 1381 | (add-before 'build 'copy-resources | |
1315 | 1382 | (lambda _ | |
1316 | 1383 | (copy-recursively "sbt/src/main/resources" "build/classes") | |
… | |||
1345 | 1412 | "project.WriteKeywords") | |
1346 | 1413 | #t)) | |
1347 | 1414 | (replace 'build | |
1348 | - | (lambda* (#:key inputs #:allow-other-keys) | |
1349 | - | (define (build-subproject prefix name) | |
1350 | - | (let ((build-directory (string-append "build/" name)) | |
1351 | - | (jar-name (string-append name ".jar")) | |
1352 | - | (kind-projector (assoc-ref inputs "scala-kind-projector"))) | |
1353 | - | (mkdir-p build-directory) | |
1354 | - | (format #t "Building project ~a...~%" name) | |
1355 | - | (apply invoke "scalac" "-classpath" | |
1356 | - | ;; 13:36 < snape> roptat: I think you could use 'readdir', as in 'files-in-directory' from guix/build/union.scm | |
1357 | - | (apply string-append (getenv "CLASSPATH") | |
1358 | - | (map (lambda (file) (string-append ":" file)) | |
1359 | - | (find-files "build" "." #:directories? #t))) | |
1360 | - | "-d" build-directory | |
1361 | - | (string-append "-Xplugin:" kind-projector | |
1362 | - | "/share/java/kind-projector.jar") | |
1363 | - | (find-files (string-append prefix name "/src/main/scala") | |
1364 | - | ".*.scala$")) | |
1365 | - | (invoke "jar" "cf" jar-name "-C" build-directory "."))) | |
1366 | - | (build-subproject "internal/" "util-collection") | |
1367 | - | (build-subproject "internal/" "util-complete") | |
1368 | - | (build-subproject "" "core-macros") | |
1369 | - | (build-subproject "" "tasks") | |
1370 | - | (build-subproject "" "tasks-standard") | |
1371 | - | (build-subproject "" "protocol") | |
1372 | - | (build-subproject "" "main-command") | |
1373 | - | (build-subproject "" "main-settings") | |
1374 | - | (build-subproject "" "sbt") | |
1415 | + | ,(sbt-building-phase | |
1416 | + | `(("internal/" "util-collection") | |
1417 | + | ("internal/" "util-complete") | |
1418 | + | ("testing/" "agent") | |
1419 | + | ("" "testing") | |
1420 | + | ("" "core-macros") | |
1421 | + | ("" "tasks") | |
1422 | + | ("" "tasks-standard") | |
1423 | + | ("" "protocol") | |
1424 | + | ("" "run") | |
1425 | + | ("" "main-command") | |
1426 | + | ("" "main-settings") | |
1427 | + | ("" "main-actions") | |
1428 | + | ("" "main") | |
1429 | + | ("" "sbt")) | |
1375 | 1430 | #t)) | |
1376 | 1431 | (replace 'install | |
1377 | 1432 | (install-jars "."))))) | |
1378 | 1433 | (inputs | |
1379 | - | `(("java-log4j-api" ,java-log4j-api-for-sbt) | |
1434 | + | `(("java-apache-ivy" ,java-apache-ivy) | |
1435 | + | ("java-sbt-ipcsocket" ,java-sbt-ipcsocket) | |
1436 | + | ("java-sbt-test-interface" ,java-sbt-test-interface) | |
1437 | + | ("java-log4j-api" ,java-log4j-api-for-sbt) | |
1380 | 1438 | ("java-log4j-core" ,java-log4j-core-for-sbt) | |
1439 | + | ("java-native-access" ,java-native-access) | |
1381 | 1440 | ("scala" ,scala-official) | |
1441 | + | ("scala-jawn" ,scala-jawn) | |
1442 | + | ("scala-scalajson" ,scala-scalajson) | |
1382 | 1443 | ("scala-sjsonnew" ,scala-sjsonnew) | |
1444 | + | ("scala-sjsonnew-support-murmurhash" ,scala-sjsonnew-support-murmurhash) | |
1445 | + | ("scala-sjsonnew-support-scalajson" ,scala-sjsonnew-support-scalajson) | |
1383 | 1446 | ("sbt-io" ,sbt-io) | |
1384 | 1447 | ("sbt-launcher" ,sbt-launcher) | |
1385 | 1448 | ("sbt-librarymanagement" ,sbt-librarymanagement) |