Add sbt-related packages
more/packages/java.scm
1896 | 1896 | (delete-file-recursively "src/main/java/freemarker/ext/jython") | |
1897 | 1897 | (delete-file "src/test/java/freemarker/core/ObjectBuilderSettingsTest.java") | |
1898 | 1898 | (delete-file-recursively "src/main/java/freemarker/ext/rhino") | |
1899 | - | ;; This class depends on javareble, a non-free package | |
1899 | + | ;; This class depends on javarebel, a non-free package | |
1900 | 1900 | (delete-file "src/main/java/freemarker/ext/beans/JRebelClassChangeNotifier.java") | |
1901 | 1901 | (delete-file "src/main/java/freemarker/ext/ant/UnlinkedJythonOperationsImpl.java") | |
1902 | 1902 | (delete-file "src/main/java/freemarker/template/utility/JythonRuntime.java") | |
… | |||
1955 | 1955 | ("java-eclipse-jetty-server" ,java-eclipse-jetty-server) | |
1956 | 1956 | ("java-eclipse-jetty-webapp" ,java-eclipse-jetty-webapp) | |
1957 | 1957 | ("java-junit" ,java-junit))) | |
1958 | - | (home-page "https://github.com/ralfstx/minimal-json") | |
1958 | + | (home-page "") | |
1959 | 1959 | (synopsis "") | |
1960 | 1960 | (description "") | |
1961 | 1961 | (license license:expat))) | |
… | |||
6469 | 6469 | (modify-phases %standard-phases | |
6470 | 6470 | (add-before 'build 'build-DescriptorProtos.java | |
6471 | 6471 | (lambda _ | |
6472 | + | (for-each | |
6473 | + | (lambda (proto) | |
6474 | + | (invoke "protoc" "--java_out=java/core/src/main/java" "-Isrc" | |
6475 | + | (string-append "src/google/protobuf/" proto ".proto"))) | |
6476 | + | '("any" "api" "descriptor" "duration" "empty" "field_mask" | |
6477 | + | "source_context" "struct" "timestamp" "type" "wrappers")) | |
6472 | 6478 | (invoke "protoc" "--java_out=java/core/src/main/java" "-Isrc" | |
6473 | - | "src/google/protobuf/descriptor.proto") | |
6479 | + | "src/google/protobuf/compiler/plugin.proto") | |
6474 | 6480 | #t))))) | |
6475 | 6481 | (inputs | |
6476 | 6482 | `(("java-guava" ,java-guava))) | |
… | |||
6760 | 6766 | (synopsis "") | |
6761 | 6767 | (description "") | |
6762 | 6768 | (license license:asl2.0))) | |
6769 | + | ||
6770 | + | (define-public java-picocli | |
6771 | + | (package | |
6772 | + | (name "java-picocli") | |
6773 | + | (version "3.8.2") | |
6774 | + | (source (origin | |
6775 | + | (method url-fetch) | |
6776 | + | (uri (string-append "https://github.com/remkop/picocli/archive/v" | |
6777 | + | version ".tar.gz")) | |
6778 | + | (sha256 | |
6779 | + | (base32 | |
6780 | + | "0rbk4kccy8qd2gnrfk9455rp48ign82h9a5n98ry4ac1i1x2ffax")))) | |
6781 | + | (build-system ant-build-system) | |
6782 | + | (arguments | |
6783 | + | `(#:jar-name "picocli.jar" | |
6784 | + | #:source-dir "src/main/java" | |
6785 | + | ;; Require org.junit.contrib.java.lang.system.* | |
6786 | + | #:tests? #f | |
6787 | + | #:phases | |
6788 | + | (modify-phases %standard-phases | |
6789 | + | (add-before 'build 'remove-groovy-dependency | |
6790 | + | (lambda _ | |
6791 | + | ;; Groovy depends on picocli, so remove a cyclic dependency here | |
6792 | + | (delete-file-recursively "src/main/java/picocli/groovy") | |
6793 | + | #t))))) | |
6794 | + | (native-inputs | |
6795 | + | `(("java-junit" ,java-junit))) | |
6796 | + | (home-page "") | |
6797 | + | (synopsis "") | |
6798 | + | (description "") | |
6799 | + | (license license:asl2.0))) | |
6800 | + | ||
6801 | + | (define-public java-protoc-jar | |
6802 | + | (package | |
6803 | + | (name "java-protoc-jar") | |
6804 | + | (version "3.6.0.1") | |
6805 | + | (source (origin | |
6806 | + | (method url-fetch) | |
6807 | + | (uri (string-append "https://github.com/os72/protoc-jar/archive/v" | |
6808 | + | version ".tar.gz")) | |
6809 | + | (sha256 | |
6810 | + | (base32 | |
6811 | + | "13q9cvplsbv9jxx5myiir4hdlhclgr9ka6c9x9f022hcn0lzgjpw")) | |
6812 | + | (modules '((guix build utils))) | |
6813 | + | (snippet | |
6814 | + | `(delete-file-recursively "bin")))) | |
6815 | + | (build-system ant-build-system) | |
6816 | + | (arguments | |
6817 | + | `(#:jar-name "protoc-jar.jar" | |
6818 | + | #:tests? #f; require network | |
6819 | + | #:source-dir "src/main/java" | |
6820 | + | #:phases | |
6821 | + | (modify-phases %standard-phases | |
6822 | + | (add-before 'build 'embed-protoc | |
6823 | + | (lambda* (#:key inputs system #:allow-other-keys) | |
6824 | + | (let* ((dir (string-append "build/classes/bin/" ,(package-version protobuf))) | |
6825 | + | (file (string-append dir "/protoc-" ,(package-version protobuf) | |
6826 | + | "-linux-" (string-drop-right system 6) ".exe"))) | |
6827 | + | (mkdir-p dir) | |
6828 | + | (copy-file (string-append (assoc-ref inputs "protobuf") "/bin/protoc") file)) | |
6829 | + | #t))))) | |
6830 | + | (inputs | |
6831 | + | `(("protobuf" ,protobuf))) | |
6832 | + | (native-inputs | |
6833 | + | `(("java-hamcrest-core" ,java-hamcrest-core) | |
6834 | + | ("java-junit" ,java-junit))) | |
6835 | + | (home-page "") | |
6836 | + | (synopsis "") | |
6837 | + | (description "") | |
6838 | + | (license license:asl2.0))) | |
6839 | + | ||
6840 | + | (define-public java-fmpp | |
6841 | + | (package | |
6842 | + | (name "java-fmpp") | |
6843 | + | (version "0.9.16") | |
6844 | + | (source (origin | |
6845 | + | (method url-fetch) | |
6846 | + | (uri (string-append "https://github.com/freemarker/fmpp/archive/v" | |
6847 | + | version ".tar.gz")) | |
6848 | + | (sha256 | |
6849 | + | (base32 | |
6850 | + | "0k66qq8mss165mqbn3gs537xgqx74rch6zx335d415vd4h9d83va")) | |
6851 | + | (patches | |
6852 | + | (search-patches "java-fmpp-remove-imageinfo.patch")) | |
6853 | + | (modules '((guix build utils))) | |
6854 | + | (snippet | |
6855 | + | ;; NOTE: the bin/ directory only contain scripts | |
6856 | + | `(begin | |
6857 | + | (delete-file-recursively "lib") | |
6858 | + | #t)))) | |
6859 | + | (build-system ant-build-system) | |
6860 | + | (arguments | |
6861 | + | `(#:test-target "test" | |
6862 | + | #:phases | |
6863 | + | (modify-phases %standard-phases | |
6864 | + | (add-before 'build 'set-modification-time | |
6865 | + | (lambda _ | |
6866 | + | ;; This software assumes that a modification date of 0 means | |
6867 | + | ;; that it failed to get the modification time. Guix sets | |
6868 | + | ;; a modification time of 0, which leads to test failures. | |
6869 | + | (for-each (lambda (file) (utime file 1 1)) (find-files "src" ".")) | |
6870 | + | #t)) | |
6871 | + | (add-before 'build 'create-lib | |
6872 | + | (lambda* (#:key inputs #:allow-other-keys) | |
6873 | + | (mkdir-p "lib") | |
6874 | + | (copy-file (string-append (assoc-ref inputs "java-apache-freemarker") | |
6875 | + | "/share/java/java-apache-freemarker.jar") | |
6876 | + | "lib/freemarker.jar") | |
6877 | + | (copy-file (string-append (assoc-ref inputs "ant") "/lib/ant.jar") | |
6878 | + | "lib/ant.jar") | |
6879 | + | (copy-file (string-append (assoc-ref inputs "java-junit") | |
6880 | + | "/share/java/junit.jar") | |
6881 | + | "lib/junit.jar") | |
6882 | + | (copy-file (string-append (assoc-ref inputs "java-hamcrest-all") | |
6883 | + | "/share/java/hamcrest-all.jar") | |
6884 | + | "lib/hamcrest-generator-nodeps.jar") | |
6885 | + | (copy-file (car (find-files (string-append (assoc-ref inputs "java-bsh") | |
6886 | + | "/share/java/") | |
6887 | + | ".*.jar$")) | |
6888 | + | "lib/bsh.jar") | |
6889 | + | (copy-file (car (find-files (string-append | |
6890 | + | (assoc-ref | |
6891 | + | inputs | |
6892 | + | "java-apache-xml-commons-resolver") | |
6893 | + | "/share/java/") | |
6894 | + | ".*.jar$")) | |
6895 | + | "lib/resolver.jar") | |
6896 | + | #t)) | |
6897 | + | (add-before 'build 'fix-class-path | |
6898 | + | (lambda* (#:key inputs #:allow-other-keys) | |
6899 | + | ;; The result otherwise requires its dependencies alongside it. | |
6900 | + | (with-fluids ((%default-port-encoding "ISO-8859-1")) | |
6901 | + | (substitute* "build.xml" | |
6902 | + | ;; Also fix embedded timestamp | |
6903 | + | (("\\$\\{timeStamp\\}") "1970-01-01T00:00:00Z") | |
6904 | + | ((" imageinfo.jar") "") | |
6905 | + | (("freemarker.jar ") | |
6906 | + | (string-append | |
6907 | + | ;; In java8, we can only refer to jar files relatively to | |
6908 | + | ;; the current jar... | |
6909 | + | "../../../../../../../../../../" | |
6910 | + | (car (find-files | |
6911 | + | (assoc-ref inputs "java-apache-freemarker") | |
6912 | + | "freemarker.jar")) | |
6913 | + | " ")) | |
6914 | + | (("bsh.jar ") | |
6915 | + | (string-append | |
6916 | + | "../../../../../../../../../../" | |
6917 | + | (car (find-files (assoc-ref inputs "java-bsh") ".*.jar$")) | |
6918 | + | " ")) | |
6919 | + | ((" resolver.jar") | |
6920 | + | (string-append | |
6921 | + | " ../../../../../../../../../../" | |
6922 | + | (car (find-files | |
6923 | + | (assoc-ref inputs "java-apache-xml-commons-resolver") | |
6924 | + | ".*.jar$")))))) | |
6925 | + | #t)) | |
6926 | + | (replace 'install | |
6927 | + | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6928 | + | (let* ((out (assoc-ref outputs "out")) | |
6929 | + | (java (string-append out "/lib")) | |
6930 | + | (bin (string-append out "/bin"))) | |
6931 | + | (install-file "lib/fmpp.jar" java) | |
6932 | + | (substitute* "bin/fmpp" | |
6933 | + | (("#!.*") | |
6934 | + | (string-append "#!" (which "sh") "\n" | |
6935 | + | "JAVA_HOME=" (assoc-ref inputs "jdk")))) | |
6936 | + | (install-file "bin/fmpp" bin) | |
6937 | + | (chmod (string-append bin "/fmpp") #o755)) | |
6938 | + | #t))))) | |
6939 | + | (inputs | |
6940 | + | `(("java-apache-freemarker" ,java-apache-freemarker) | |
6941 | + | ("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver) | |
6942 | + | ("java-bsh" ,java-bsh))) | |
6943 | + | (native-inputs | |
6944 | + | `(("java-hamcrest-all" ,java-hamcrest-all) | |
6945 | + | ("java-junit" ,java-junit))) | |
6946 | + | (home-page "") | |
6947 | + | (synopsis "") | |
6948 | + | (description "") | |
6949 | + | (license license:asl2.0))) |
more/packages/scala.scm
29 | 29 | #:use-module (gnu packages bash) | |
30 | 30 | #:use-module (gnu packages compression) | |
31 | 31 | #:use-module (gnu packages java) | |
32 | + | #:use-module (gnu packages protobuf) | |
32 | 33 | #:use-module (more packages java)) | |
33 | 34 | ||
34 | 35 | ;; This package downloads the so-called official version of scala, a pre-built | |
… | |||
39 | 40 | (define-public scala-official | |
40 | 41 | (package | |
41 | 42 | (name "scala-official") | |
42 | - | (version "2.12.6") | |
43 | + | (version "2.12.8") | |
43 | 44 | (source | |
44 | 45 | (origin | |
45 | 46 | (method url-fetch) | |
… | |||
47 | 48 | version "/scala-" version ".tgz")) | |
48 | 49 | (sha256 | |
49 | 50 | (base32 | |
50 | - | "05ili2959yrshqi44wpmwy0dyfm4kvp6i8mlbnj1xvc5b9649iqs")))) | |
51 | + | "18w0vdbsp0q5rxglgalwlgkggld926bqi1fxc598rn4gh46a03j4")))) | |
51 | 52 | (build-system trivial-build-system) | |
52 | 53 | (arguments | |
53 | 54 | `(#:modules ((guix build utils)) | |
… | |||
65 | 66 | (mkdir-p output) | |
66 | 67 | (setenv "PATH" (string-append (getenv "PATH") ":" gzip "/bin")) | |
67 | 68 | (invoke tar "xf" source) | |
68 | - | (copy-recursively "scala-2.12.6" output) | |
69 | + | (copy-recursively "scala-2.12.8" output) | |
69 | 70 | (chdir output) | |
70 | 71 | (for-each delete-file (find-files "bin" "bat$")) | |
71 | 72 | (substitute* (find-files "bin" ".*") | |
… | |||
81 | 82 | (description "") | |
82 | 83 | (license license:bsd-3))) | |
83 | 84 | ||
85 | + | ;; TODO: put it in guix/build/java-utils.scm | |
86 | + | ;; TODO: remove contraband-* directories and regenerate them from contraband/ | |
87 | + | (define (sbt-building-phase subprojects) | |
88 | + | `(lambda* (#:key inputs #:allow-other-keys) | |
89 | + | (define (build-subproject prefix name) | |
90 | + | (let ((build-directory (string-append "build/" name)) | |
91 | + | (jar-name (string-append | |
92 | + | (if (> (string-length prefix) 0) | |
93 | + | (string-replace prefix "-" (- (string-length prefix) 1)) | |
94 | + | "") | |
95 | + | name ".jar")) | |
96 | + | (java-files | |
97 | + | (append | |
98 | + | (find-files (string-append prefix name "/src/main/contraband-java") | |
99 | + | ".*.java$") | |
100 | + | (find-files (string-append prefix name "/src/main/java") | |
101 | + | ".*.java$"))) | |
102 | + | (scala-files | |
103 | + | (append | |
104 | + | (find-files (string-append prefix name "/src/main/contraband-scala") | |
105 | + | ".*.scala$") | |
106 | + | (find-files (string-append prefix name "/src/main/scala") | |
107 | + | ".*.scala$")))) | |
108 | + | (mkdir-p build-directory) | |
109 | + | (format #t "Building project ~a...~%" jar-name) | |
110 | + | (unless (eq? scala-files '()) | |
111 | + | (apply invoke "scalac" "-classpath" | |
112 | + | (string-append | |
113 | + | (getenv "CLASSPATH") ":" | |
114 | + | ;; Add any top-level directory in build that may contain | |
115 | + | ;; .class files, but don't actually add build/ iteself or | |
116 | + | ;; any individual class file. | |
117 | + | (string-join | |
118 | + | (filter (lambda (s) (eq? (string-count s #\/) 1)) | |
119 | + | (find-files "build" "." #:directories? #t)) | |
120 | + | ":")) | |
121 | + | "-d" build-directory "-language:experimental.macros" | |
122 | + | (append scala-files java-files))) | |
123 | + | (unless (eq? java-files '()) | |
124 | + | (apply invoke "javac" "-classpath" | |
125 | + | (string-append | |
126 | + | (getenv "CLASSPATH") ":" | |
127 | + | (string-join | |
128 | + | (filter (lambda (s) (eq? (string-count s #\/) 1)) | |
129 | + | (find-files "build" "." #:directories? #t)) | |
130 | + | ":")) | |
131 | + | "-d" build-directory java-files)) | |
132 | + | (invoke "jar" "cf" (string-append "build/jar/" jar-name) | |
133 | + | "-C" build-directory "."))) | |
134 | + | (mkdir-p "build/jar") | |
135 | + | (for-each (lambda (project) | |
136 | + | (build-subproject (car project) (cadr project))) | |
137 | + | '(,@subprojects)) | |
138 | + | #t)) | |
139 | + | ||
84 | 140 | (define-public sbt-boilerplate-standalone | |
85 | 141 | (package | |
86 | 142 | (name "sbt-boilerplate-standalone") | |
… | |||
96 | 152 | (build-system ant-build-system) | |
97 | 153 | (arguments | |
98 | 154 | `(#:tests? #f | |
99 | - | #:jdk ,icedtea-8 | |
100 | 155 | #:phases | |
101 | 156 | (modify-phases %standard-phases | |
102 | 157 | (add-before 'build 'add-standalone | |
… | |||
150 | 205 | "1rv0c50af5kn27x51g650wl2ig94z52fhs0rn8ykahpz4jhg1p7p")))) | |
151 | 206 | (arguments | |
152 | 207 | `(#:tests? #f | |
153 | - | #:jdk ,icedtea-8 | |
154 | 208 | #:phases | |
155 | 209 | (modify-phases %standard-phases | |
156 | 210 | (add-before 'build 'generate-boilerplate | |
… | |||
333 | 387 | (define-public scala-kind-projector | |
334 | 388 | (package | |
335 | 389 | (name "scala-kind-projector") | |
336 | - | (version "0.9.7") | |
390 | + | (version "0.9.9") | |
337 | 391 | (source (origin | |
338 | 392 | (method url-fetch) | |
339 | 393 | (uri (string-append "https://github.com/non/kind-projector/archive/v" | |
… | |||
341 | 395 | (file-name (string-append name "-" version ".tar.gz")) | |
342 | 396 | (sha256 | |
343 | 397 | (base32 | |
344 | - | "176g2d7ix2asp94ch39mza84k6z8by308hzglxs8933j8byramff")))) | |
398 | + | "125amrhy7ri0z4bk2jzghg7341fm88a0p6gw3qg5diminlpaida3")))) | |
345 | 399 | (build-system ant-build-system) | |
346 | 400 | (arguments | |
347 | - | `(#:jdk ,icedtea-8 | |
348 | - | #:phases | |
401 | + | `(#:phases | |
349 | 402 | (modify-phases %standard-phases | |
350 | 403 | (replace 'build | |
351 | 404 | (lambda _ | |
… | |||
379 | 432 | lambdas (type projections) easier to write.") | |
380 | 433 | (license license:expat))) | |
381 | 434 | ||
382 | - | (define-public sbt-util-position | |
435 | + | (define-public sbt-util | |
383 | 436 | (package | |
384 | - | (name "sbt-util-position") | |
385 | - | (version "1.2.2") | |
437 | + | (name "sbt-util") | |
438 | + | (version "1.2.4") | |
386 | 439 | (source | |
387 | 440 | (origin | |
388 | 441 | (method url-fetch) | |
… | |||
391 | 444 | (file-name (string-append "sbt-util-" version ".tar.gz")) | |
392 | 445 | (sha256 | |
393 | 446 | (base32 | |
394 | - | "1mj6ny62crq1d8850lkj00g3wsjhflaxrqiiv72b02fb8hn671dh")))) | |
447 | + | "04ss1q4rl272ryxys05zmd4j2gm3aanaiqn6dmqbh6jii934pyxg")))) | |
395 | 448 | (build-system ant-build-system) | |
396 | 449 | (arguments | |
397 | 450 | `(#:tests? #f | |
398 | - | #:jdk ,icedtea-8 | |
399 | 451 | #:phases | |
400 | 452 | (modify-phases %standard-phases | |
401 | - | (replace 'build | |
402 | - | (lambda* (#:key inputs #:allow-other-keys) | |
403 | - | (define (build-subproject prefix name) | |
404 | - | (let ((build-directory (string-append "build/" name)) | |
405 | - | (jar-name (string-append name ".jar"))) | |
406 | - | (mkdir-p build-directory) | |
407 | - | (format #t "Building project ~a...~%" name) | |
408 | - | (apply invoke "scalac" "-classpath" | |
409 | - | (string-append (getenv "CLASSPATH") ":build/util-interface") | |
410 | - | "-d" build-directory "-language:experimental.macros" | |
411 | - | (find-files (string-append prefix name "/src/main/scala") | |
412 | - | ".*.scala$")) | |
413 | - | (invoke "jar" "cf" jar-name "-C" build-directory "."))) | |
414 | - | (build-subproject "internal/" "util-position") | |
453 | + | (add-before 'build 'fix-sjsonnew | |
454 | + | (lambda _ | |
455 | + | (substitute* (find-files "." ".*.scala") | |
456 | + | (("sjsonnew.shaded.") "")) | |
415 | 457 | #t)) | |
458 | + | (replace 'build | |
459 | + | ,(sbt-building-phase | |
460 | + | '(("internal/" "util-position") | |
461 | + | ("internal/" "util-control") | |
462 | + | ("internal/" "util-interface") | |
463 | + | ("internal/" "util-logging") | |
464 | + | ("internal/" "util-relation") | |
465 | + | ("internal/" "util-scripted") | |
466 | + | ("" "util-cache") | |
467 | + | ("" "util-tracking")))) | |
416 | 468 | (replace 'install | |
417 | 469 | (install-jars "."))))) | |
418 | 470 | (inputs | |
419 | - | `(("java-log4j-api" ,java-log4j-api) | |
420 | - | ("java-log4j-core" ,java-log4j-core) | |
421 | - | ("scala" ,scala-official) | |
422 | - | ("scala-sjsonnew" ,scala-sjsonnew))) | |
471 | + | `(("java-log4j-api" ,java-log4j-api-for-sbt) | |
472 | + | ("java-log4j-core" ,java-log4j-core-for-sbt) | |
473 | + | ("sbt-io" ,sbt-io) | |
474 | + | ("scala-jawn" ,scala-jawn) | |
475 | + | ("scala-scalajson" ,scala-scalajson) | |
476 | + | ("scala-sjsonnew" ,scala-sjsonnew) | |
477 | + | ("scala-sjsonnew-support-murmurhash" ,scala-sjsonnew-support-murmurhash) | |
478 | + | ("scala-sjsonnew-support-scalajson" ,scala-sjsonnew-support-scalajson))) | |
479 | + | (native-inputs | |
480 | + | `(("scala" ,scala-official))) | |
423 | 481 | (home-page "https://www.scala-sbt.org/") | |
424 | 482 | (synopsis "") | |
425 | 483 | (description "") | |
426 | 484 | (license license:bsd-3))) | |
427 | 485 | ||
428 | - | (define-public sbt-util-control | |
429 | - | (package | |
430 | - | (inherit sbt-util-position) | |
431 | - | (name "sbt-util-control") | |
432 | - | (arguments | |
433 | - | `(#:tests? #f | |
434 | - | #:jdk ,icedtea-8 | |
435 | - | #:phases | |
436 | - | (modify-phases %standard-phases | |
437 | - | (replace 'build | |
438 | - | (lambda* (#:key inputs #:allow-other-keys) | |
439 | - | (define (build-subproject prefix name) | |
440 | - | (let ((build-directory (string-append "build/" name)) | |
441 | - | (jar-name (string-append name ".jar"))) | |
442 | - | (mkdir-p build-directory) | |
443 | - | (format #t "Building project ~a...~%" name) | |
444 | - | (apply invoke "scalac" "-classpath" | |
445 | - | (string-append (getenv "CLASSPATH") ":build/util-interface") | |
446 | - | "-d" build-directory "-language:experimental.macros" | |
447 | - | (find-files (string-append prefix name "/src/main/scala") | |
448 | - | ".*.scala$")) | |
449 | - | (invoke "jar" "cf" jar-name "-C" build-directory "."))) | |
450 | - | (build-subproject "internal/" "util-control") | |
451 | - | #t)) | |
452 | - | (replace 'install | |
453 | - | (install-jars "."))))))) | |
454 | - | ||
455 | - | (define-public sbt-util-interface | |
456 | - | (package | |
457 | - | (inherit sbt-util-position) | |
458 | - | (name "sbt-util-interface") | |
459 | - | (arguments | |
460 | - | `(#:tests? #f | |
461 | - | #:jdk ,icedtea-8 | |
462 | - | #:source-dir "internal/util-interface/src/main/java" | |
463 | - | #:jar-name "util-interface.jar")))) | |
464 | - | ||
465 | 486 | (define-public java-log4j-api-for-sbt | |
466 | 487 | (package | |
467 | 488 | (inherit java-log4j-api) | |
… | |||
469 | 490 | ;(version "2.11.1") | |
470 | 491 | (arguments | |
471 | 492 | (ensure-keyword-arguments (package-arguments java-log4j-api) | |
472 | - | `(#:jdk ,icedtea-8 | |
473 | - | #:source-dir "src/main/java" | |
493 | + | `(#:source-dir "src/main/java" | |
474 | 494 | #:phases | |
475 | 495 | (modify-phases %standard-phases | |
476 | 496 | (add-after 'unpack 'chdir | |
… | |||
529 | 549 | #:test-dir "src/test" | |
530 | 550 | #:source-dir "src/main/java" | |
531 | 551 | #:jar-name "log4j-core.jar" | |
532 | - | #:jdk ,icedtea-8 | |
533 | 552 | #:make-flags | |
534 | 553 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
535 | 554 | "/share/java")) | |
… | |||
547 | 566 | logging framework for Java."))) | |
548 | 567 | ||
549 | 568 | ||
550 | - | (define-public sbt-util-logging | |
551 | - | (package | |
552 | - | (inherit sbt-util-position) | |
553 | - | (name "sbt-util-logging") | |
554 | - | (arguments | |
555 | - | `(#:tests? #f | |
556 | - | #:jdk ,icedtea-8 | |
557 | - | #:phases | |
558 | - | (modify-phases %standard-phases | |
559 | - | (replace 'build | |
560 | - | (lambda* (#:key inputs #:allow-other-keys) | |
561 | - | (define (build-subproject prefix name) | |
562 | - | (let ((build-directory (string-append "build/" name)) | |
563 | - | (jar-name (string-append name ".jar"))) | |
564 | - | (mkdir-p build-directory) | |
565 | - | (format #t "Building project ~a...~%" name) | |
566 | - | (substitute* (find-files "." ".*.scala") | |
567 | - | (("sjsonnew.shaded.") "")) | |
568 | - | (apply invoke "scalac" "-classpath" | |
569 | - | (string-append (getenv "CLASSPATH") ":build/util-interface") | |
570 | - | "-d" build-directory "-language:experimental.macros" | |
571 | - | (append | |
572 | - | (find-files (string-append prefix name "/src/main/contraband-scala") | |
573 | - | ".*.scala$") | |
574 | - | (find-files (string-append prefix name "/src/main/scala") | |
575 | - | ".*.scala$"))) | |
576 | - | (invoke "jar" "cf" jar-name "-C" build-directory "."))) | |
577 | - | (build-subproject "internal/" "util-logging") | |
578 | - | #t)) | |
579 | - | (replace 'install | |
580 | - | (install-jars "."))))) | |
581 | - | (inputs | |
582 | - | `(("java-log4j-api" ,java-log4j-api-for-sbt) | |
583 | - | ("java-log4j-core" ,java-log4j-core-for-sbt) | |
584 | - | ("sbt-util-interface" ,sbt-util-interface) | |
585 | - | ("scala-scalajson" ,scala-scalajson) | |
586 | - | ("scala-sjsonnew" ,scala-sjsonnew) | |
587 | - | ("scala-sjsonnew-support-scalajson" ,scala-sjsonnew-support-scalajson))) | |
588 | - | (native-inputs | |
589 | - | `(("scala-official" ,scala-official))))) | |
590 | - | ||
591 | - | (define-public sbt-util-cache | |
592 | - | (package | |
593 | - | (inherit sbt-util-position) | |
594 | - | (name "sbt-util-cache") | |
595 | - | (arguments | |
596 | - | `(#:tests? #f | |
597 | - | #:phases | |
598 | - | (modify-phases %standard-phases | |
599 | - | (replace 'build | |
600 | - | (lambda* (#:key inputs #:allow-other-keys) | |
601 | - | (define (build-subproject prefix name) | |
602 | - | (let ((build-directory (string-append "build/" name)) | |
603 | - | (jar-name (string-append name ".jar"))) | |
604 | - | (mkdir-p build-directory) | |
605 | - | (substitute* (find-files "." ".*.scala") | |
606 | - | (("sjsonnew.shaded.") "")) | |
607 | - | (format #t "Building project ~a...~%" name) | |
608 | - | (apply invoke "scalac" "-classpath" | |
609 | - | (string-append (getenv "CLASSPATH") ":build/util-interface") | |
610 | - | "-d" build-directory "-language:experimental.macros" | |
611 | - | (append | |
612 | - | (find-files (string-append prefix name "/src/main/contraband-scala") | |
613 | - | ".*.scala$") | |
614 | - | (find-files (string-append prefix name "/src/main/scala") | |
615 | - | ".*.scala$"))) | |
616 | - | (invoke "jar" "cf" jar-name "-C" build-directory "."))) | |
617 | - | (build-subproject "" "util-cache") | |
618 | - | #t)) | |
619 | - | (replace 'install | |
620 | - | (install-jars "."))))) | |
621 | - | (inputs | |
622 | - | `(("sbt-io" ,sbt-io) | |
623 | - | ("scala-jawn" ,scala-jawn) | |
624 | - | ("scala-scalajson" ,scala-scalajson) | |
625 | - | ("scala-sjsonnew" ,scala-sjsonnew) | |
626 | - | ("scala-sjsonnew-support-murmurhash" ,scala-sjsonnew-support-murmurhash) | |
627 | - | ("scala-sjsonnew-support-scalajson" ,scala-sjsonnew-support-scalajson))) | |
628 | - | (native-inputs | |
629 | - | `(("scala-official" ,scala-official))))) | |
630 | - | ||
569 | + | ;; TODO: Update to 2.0.6? | |
631 | 570 | (define-public java-swoval-apple-file-events | |
632 | 571 | (package | |
633 | 572 | (name "java-swoval-apple-file-events") | |
… | |||
642 | 581 | "0ivrc4lcali84xp8frkjb2zi1l3lw8pim9xbkfah5iyj120gw6mq")))) | |
643 | 582 | (build-system ant-build-system) | |
644 | 583 | (arguments | |
645 | - | `(#:jdk ,icedtea-8 | |
646 | - | #:tests? #f; no tests | |
584 | + | `(#:tests? #f; no tests | |
647 | 585 | #:jar-name "apple-file-events.jar" | |
648 | 586 | #:source-dir "apple-file-events/jvm/src/main/java")) | |
649 | 587 | (home-page "") | |
… | |||
654 | 592 | (define-public sbt-io | |
655 | 593 | (package | |
656 | 594 | (name "sbt-io") | |
657 | - | (version "1.2.1") | |
595 | + | (version "1.2.2") | |
658 | 596 | (source | |
659 | 597 | (origin | |
660 | 598 | (method url-fetch) | |
… | |||
663 | 601 | (file-name (string-append name "-" version ".tar.gz")) | |
664 | 602 | (sha256 | |
665 | 603 | (base32 | |
666 | - | "0cgk3y3w8yjpivi910px529bz8bil49lrnib6wbwmvq8lw8mgrwq")))) | |
604 | + | "0f9yjrrcr15kx2fn7w8f8swpx2dsx5zn95yg744l9gi2ri2qpyj5")))) | |
667 | 605 | (build-system ant-build-system) | |
668 | 606 | (arguments | |
669 | 607 | `(#:tests? #f | |
670 | - | #:jdk ,icedtea-8 | |
671 | 608 | #:phases | |
672 | 609 | (modify-phases %standard-phases | |
673 | 610 | (replace 'build | |
… | |||
697 | 634 | (define-public scala-ssl-config | |
698 | 635 | (package | |
699 | 636 | (name "scala-ssl-config") | |
700 | - | (version "0.3.4") | |
637 | + | (version "0.3.7") | |
701 | 638 | (source (origin | |
702 | 639 | (method url-fetch) | |
703 | 640 | (uri (string-append "https://github.com/lightbend/ssl-config/archive/v" | |
… | |||
705 | 642 | (file-name (string-append name "-" version ".tar.gz")) | |
706 | 643 | (sha256 | |
707 | 644 | (base32 | |
708 | - | "1wbxxg64xlgw1p5mrqn0vkj2l7k55c4safdxw05pxrdx0nmirnl2")))) | |
645 | + | "0sg477705flhcdnhjyl8v9jkhx1xfsnc73md8iva1agylpj5546f")))) | |
709 | 646 | (build-system ant-build-system) | |
710 | 647 | (arguments | |
711 | 648 | `(#:tests? #f | |
… | |||
754 | 691 | "-d" "build/classes" | |
755 | 692 | (append | |
756 | 693 | (find-files "core/src/main/scala" ".*.scala$") | |
757 | - | (find-files "gigahorse/src/main/scala" ".*.scala$") | |
694 | + | (find-files "okhttp/src/main/scala" ".*.scala$") | |
758 | 695 | (find-files "core/src/main/contraband-scala" ".*.scala$"))) | |
759 | 696 | (invoke "jar" "cf" "okhttp.jar" "-C" "build/classes" ".") | |
760 | 697 | #t)) | |
… | |||
764 | 701 | `(("java-config" ,java-config) | |
765 | 702 | ("java-reactive-streams" ,java-reactive-streams) | |
766 | 703 | ("java-slf4j-api" ,java-slf4j-api) | |
704 | + | ("java-okhttp" ,java-okhttp) | |
705 | + | ("java-okio" ,java-okio) | |
767 | 706 | ("scala-ssl-config" ,scala-ssl-config))) | |
768 | 707 | (native-inputs | |
769 | 708 | `(("scala" ,scala-official))) | |
… | |||
772 | 711 | (description "") | |
773 | 712 | (license license:asl2.0))) | |
774 | 713 | ||
714 | + | (define-public sbt-launcher | |
715 | + | (package | |
716 | + | (name "sbt-launcher") | |
717 | + | (version "1.0.4") | |
718 | + | (source (origin | |
719 | + | (method url-fetch) | |
720 | + | (uri (string-append "https://github.com/sbt/launcher/archive/v" version ".tar.gz")) | |
721 | + | (file-name (string-append name "-" version ".tar.gz")) | |
722 | + | (sha256 | |
723 | + | (base32 | |
724 | + | "1a9dfqm47fn2nbqvjl723s0h16jf71cgnilg1i7gz6h4a7i0snak")))) | |
725 | + | (build-system ant-build-system) | |
726 | + | (arguments | |
727 | + | `(#:tests? #f | |
728 | + | #:phases | |
729 | + | (modify-phases %standard-phases | |
730 | + | (replace 'build | |
731 | + | (lambda* (#:key inputs #:allow-other-keys) | |
732 | + | (substitute* "launcher-implementation/src/main/input_sources/CrossVersionUtil.scala" | |
733 | + | (("\\$\\{\\{cross.package0\\}\\}") "xsbt") | |
734 | + | (("\\$\\{\\{cross.package1\\}\\}") "boot")) | |
735 | + | (mkdir-p "build/classes") | |
736 | + | (apply invoke "scalac" "-classpath" (getenv "CLASSPATH") | |
737 | + | "-d" "build/classes" | |
738 | + | (append | |
739 | + | (find-files "launcher-interface/src/main/java" ".*.java$") | |
740 | + | (find-files "launcher-implementation/src/main/input_sources" ".*.scala$") | |
741 | + | (find-files "launcher-implementation/src/main/scala" ".*.scala$"))) | |
742 | + | (apply invoke "javac" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
743 | + | "-d" "build/classes" | |
744 | + | (find-files "launcher-interface/src/main/java" ".*.java$")) | |
745 | + | (invoke "jar" "cf" "sbt-launcher.jar" "-C" "build/classes" ".") | |
746 | + | #t)) | |
747 | + | (replace 'install | |
748 | + | (install-jars "."))))) | |
749 | + | (inputs | |
750 | + | `(("java-apache-ivy" ,java-apache-ivy))) | |
751 | + | (native-inputs | |
752 | + | `(("scala" ,scala-official))) | |
753 | + | (home-page "") | |
754 | + | (synopsis "") | |
755 | + | (description "") | |
756 | + | (license license:bsd-3))) | |
757 | + | ||
775 | 758 | ;; https://index.scala-lang.org/eed3si9n/gigahorse/gigahorse-okhttp/0.3.0?target=_2.12 | |
776 | 759 | (define-public sbt-librarymanagement | |
777 | 760 | (package | |
778 | 761 | (name "sbt-librarymanagement") | |
779 | - | (version "1.2.3") | |
762 | + | (version "1.2.4") | |
780 | 763 | (source (origin | |
781 | 764 | (method url-fetch) | |
782 | 765 | (uri (string-append "https://github.com/sbt/librarymanagement/archive/v" version ".tar.gz")) | |
783 | 766 | (file-name (string-append name "-" version ".tar.gz")) | |
784 | 767 | (sha256 | |
785 | 768 | (base32 | |
786 | - | "0a29xzcw2qzviv073g040m3lcylybh2qj1xcdkcjdcfajad7c27k")))) | |
769 | + | "0g37agv3xkq1fjl9a25ybcdk4d5aq1m81rz5d2a8zvny135m73gl")) | |
770 | + | (modules '((guix build utils))) | |
771 | + | (snippet | |
772 | + | `(for-each delete-file (find-files "." ".*.jar"))))) | |
787 | 773 | (build-system ant-build-system) | |
788 | 774 | (arguments | |
789 | 775 | `(#:tests? #f | |
… | |||
798 | 784 | (find-files "core/src/main/java" ".*.java$") | |
799 | 785 | (find-files "core/src/main/scala" ".*.scala$") | |
800 | 786 | (find-files "core/src/main/contraband-scala" ".*.scala$"))) | |
801 | - | (invoke "jar" "cf" "sbt-io.jar" "-C" "build/classes" ".") | |
787 | + | (invoke "jar" "cf" "sbt-librarymanagement.jar" "-C" "build/classes" ".") | |
802 | 788 | #t)) | |
803 | 789 | (replace 'install | |
804 | 790 | (install-jars "."))))) | |
805 | 791 | (inputs | |
806 | - | `(("sbt-util-cache" ,sbt-util-cache) | |
807 | - | ("sbt-util-interface" ,sbt-util-interface) | |
808 | - | ("sbt-util-logging" ,sbt-util-logging) | |
809 | - | ("sbt-util-position" ,sbt-util-position) | |
792 | + | `(("sbt-launcher" ,sbt-launcher) | |
793 | + | ("sbt-util" ,sbt-util) | |
810 | 794 | ("sbt-io" ,sbt-io) | |
811 | 795 | ("scala-okhttp" ,scala-okhttp) | |
812 | 796 | ("scala-sjsonnew" ,scala-sjsonnew))) | |
… | |||
818 | 802 | ;; From core/NOTICE | |
819 | 803 | (license license:bsd-2))) | |
820 | 804 | ||
805 | + | ;; LICENSE? | |
806 | + | (define-public scala-protoc-bridge | |
807 | + | (package | |
808 | + | (name "scala-protoc-bridge") | |
809 | + | (version "0.7.3") | |
810 | + | (source | |
811 | + | (origin | |
812 | + | (method url-fetch) | |
813 | + | (uri (string-append "https://github.com/scalapb/protoc-bridge/archive/v" | |
814 | + | version ".tar.gz")) | |
815 | + | (file-name (string-append name "-" version ".tar.gz")) | |
816 | + | (sha256 | |
817 | + | (base32 | |
818 | + | "17xjsa70h0w80rhps00kj42fmghk98c789aaa19g4bii2j1ckry8")))) | |
819 | + | (build-system ant-build-system) | |
820 | + | (arguments | |
821 | + | `(#:phases | |
822 | + | (modify-phases %standard-phases | |
823 | + | (add-before 'build 'fix-script | |
824 | + | (lambda _ | |
825 | + | (substitute* "src/main/scala/protocbridge/frontend/PosixPluginFrontend.scala" | |
826 | + | (("/usr/bin/env sh") (which "sh"))) | |
827 | + | #t)) | |
828 | + | (replace 'build | |
829 | + | (lambda _ | |
830 | + | (mkdir-p "build/classes") | |
831 | + | (apply invoke "scalac" "-classpath" (getenv "CLASSPATH") | |
832 | + | "-d" "build/classes" | |
833 | + | (append | |
834 | + | (find-files "src/main/scala" ".*.scala$") | |
835 | + | (find-files "src/main/java" ".*.java$"))) | |
836 | + | (apply invoke "javac" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
837 | + | "-d" "build/classes" | |
838 | + | (find-files "src/main/java" ".*.java$")) | |
839 | + | (mkdir-p "build/jar") | |
840 | + | (invoke "jar" "-cf" "build/jar/protoc-bridge.jar" | |
841 | + | "-C" "build/classes" ".") | |
842 | + | #t)) | |
843 | + | (replace 'check | |
844 | + | (lambda _ | |
845 | + | (mkdir-p "build/test-classes") | |
846 | + | ;(apply invoke "scalac" "-classpath" (string-append (getenv "CLASSPATH") | |
847 | + | ; ":build/classes") | |
848 | + | ; "-d" "build/test-classes" | |
849 | + | ; (find-files "src/test/scala" ".*.scala$")) | |
850 | + | ;; TODO: actually run the tests | |
851 | + | #t)) | |
852 | + | (replace 'install | |
853 | + | (install-jars "build"))))) | |
854 | + | (native-inputs | |
855 | + | `(("scala" ,scala-official))) | |
856 | + | (home-page "") | |
857 | + | (synopsis "") | |
858 | + | (description "") | |
859 | + | (license license:bsd-3))) | |
860 | + | ||
861 | + | (define-public scala-sourcecode | |
862 | + | (package | |
863 | + | (name "scala-sourcecode") | |
864 | + | (version "0.1.5") | |
865 | + | (source (origin | |
866 | + | (method url-fetch) | |
867 | + | (uri (string-append "https://github.com/lihaoyi/sourcecode/archive/v" | |
868 | + | version ".tar.gz")) | |
869 | + | (file-name (string-append name "-" version ".tar.gz")) | |
870 | + | (sha256 | |
871 | + | (base32 | |
872 | + | "1cq15cxsv0j6xdrl566ywmab5il3239ja4cbgm39ihyn0yw2q1q4")))) | |
873 | + | (build-system ant-build-system) | |
874 | + | (arguments | |
875 | + | `(#:tests? #f; in sourcecode/shared/src/test | |
876 | + | #:phases | |
877 | + | (modify-phases %standard-phases | |
878 | + | (add-before 'build 'copy-compat | |
879 | + | (lambda _ | |
880 | + | (with-directory-excursion "sourcecode/shared/src/main" | |
881 | + | (copy-file "scala-2.11/sourcecode/Compat.scala" | |
882 | + | "scala/sourcecode/Compat.scala")) | |
883 | + | #t)) | |
884 | + | (replace 'build | |
885 | + | (lambda _ | |
886 | + | (mkdir-p "build/classes") | |
887 | + | (mkdir-p "build/jar") | |
888 | + | (apply invoke "scalac" "-classpath" (getenv "CLASSPATH") | |
889 | + | "-d" "build/classes" | |
890 | + | (find-files "sourcecode/shared/src/main/scala" ".*.scala$")) | |
891 | + | (invoke "jar" "cf" "build/jar/sourcecode.jar" "-C" "build/classes" ".") | |
892 | + | #t)) | |
893 | + | (replace 'install | |
894 | + | (install-jars "build"))))) | |
895 | + | (native-inputs | |
896 | + | `(("scala" ,scala-official))) | |
897 | + | (home-page "") | |
898 | + | (synopsis "") | |
899 | + | (description "") | |
900 | + | (license license:expat))) | |
901 | + | ||
902 | + | (define-public scala-acyclic | |
903 | + | (package | |
904 | + | (name "scala-acyclic") | |
905 | + | (version "0.1.8") | |
906 | + | (source (origin | |
907 | + | (method url-fetch) | |
908 | + | (uri (string-append "https://github.com/lihaoyi/acyclic/archive/v" | |
909 | + | version ".tar.gz")) | |
910 | + | (file-name (string-append name "-" version ".tar.gz")) | |
911 | + | (sha256 | |
912 | + | (base32 | |
913 | + | "0c26qnjfhihn06sf17bxskacjcr51s03ygcmj8fp5vdzgcyfh7dl")))) | |
914 | + | (build-system ant-build-system) | |
915 | + | (arguments | |
916 | + | `(#:tests? #f; in sourcecode/shared/src/test | |
917 | + | #:phases | |
918 | + | (modify-phases %standard-phases | |
919 | + | (add-before 'build 'copy-compat | |
920 | + | (lambda _ | |
921 | + | (with-directory-excursion "src/main" | |
922 | + | (copy-file "scala-2.10_2.12/acyclic/plugin/Compat.scala" | |
923 | + | "scala/acyclic/plugin/Compat.scala")) | |
924 | + | #t)) | |
925 | + | (replace 'build | |
926 | + | (lambda _ | |
927 | + | (mkdir-p "build/classes") | |
928 | + | (mkdir-p "build/jar") | |
929 | + | (apply invoke "scalac" "-classpath" (getenv "CLASSPATH") | |
930 | + | "-d" "build/classes" | |
931 | + | (find-files "src/main/scala" ".*.scala$")) | |
932 | + | (copy-recursively "src/main/resources" "build/classes") | |
933 | + | (invoke "jar" "cf" "build/jar/acyclic.jar" "-C" "build/classes" ".") | |
934 | + | #t)) | |
935 | + | (replace 'install | |
936 | + | (install-jars "build"))))) | |
937 | + | (native-inputs | |
938 | + | `(("scala" ,scala-official))) | |
939 | + | (home-page "") | |
940 | + | (synopsis "") | |
941 | + | (description "") | |
942 | + | (license license:expat))) | |
943 | + | ||
944 | + | (define-public scala-fastparse | |
945 | + | (package | |
946 | + | (name "scala-fastparse") | |
947 | + | (version "2.1.0") | |
948 | + | (source (origin | |
949 | + | (method url-fetch) | |
950 | + | (uri (string-append "https://github.com/lihaoyi/fastparse/archive/" | |
951 | + | version ".tar.gz")) | |
952 | + | (file-name (string-append name "-" version ".tar.gz")) | |
953 | + | (sha256 | |
954 | + | (base32 | |
955 | + | "1h8s3izykv3x2g7klihk03mbnjcp23f2613827y62kdk6x9q6yjs")))) | |
956 | + | (build-system ant-build-system) | |
957 | + | (arguments | |
958 | + | `(#:tests? #f; in fastpares/test/src | |
959 | + | #:modules | |
960 | + | ((guix build ant-build-system) | |
961 | + | (guix build java-utils) | |
962 | + | (guix build utils) | |
963 | + | (srfi srfi-1)) | |
964 | + | #:imported-modules | |
965 | + | ((srfi srfi-1) ; for iota | |
966 | + | ,@%ant-build-system-modules) | |
967 | + | #:phases | |
968 | + | (modify-phases %standard-phases | |
969 | + | (add-before 'build 'generate-sources | |
970 | + | (lambda _ | |
971 | + | (define (tuple num) | |
972 | + | (let* ((ts (map (lambda (n) (string-append "T" (number->string n))) | |
973 | + | (iota num 1))) | |
974 | + | (chunks (map (lambda (n) | |
975 | + | (string-append "t._" (number->string n))) | |
976 | + | (iota num 1))) | |
977 | + | (chunkss (string-join chunks ", ")) | |
978 | + | (tsD (string-join (reverse (cons "D" (reverse ts))) ",")) | |
979 | + | (anys (string-join (map (const "Any") ts) ", ")) | |
980 | + | (tss (string-join ts ", "))) | |
981 | + | (format #t " | |
982 | + | val BaseSequencer~a: Sequencer[(~a), Any, (~a, Any)] = | |
983 | + | Sequencer0((t, d) => (~a, d)) | |
984 | + | implicit def Sequencer~a[~a]: Sequencer[(~a), D, (~a)] = | |
985 | + | BaseSequencer~a.asInstanceOf[Sequencer[(~a), D, (~a)]] | |
986 | + | " num anys anys chunkss num tsD tss tsD num tss tsD))) | |
987 | + | (with-output-to-file "fastparse/src/fastparse/SequencerGen.scala" | |
988 | + | (lambda _ | |
989 | + | (format #t "package fastparse | |
990 | + | trait SequencerGen[Sequencer[_, _, _]] extends LowestPriSequencer[Sequencer]{ | |
991 | + | protected[this] def Sequencer0[A, B, C](f: (A, B) => C): Sequencer[A, B, C] | |
992 | + | ") | |
993 | + | (for-each tuple (iota 20 2)) | |
994 | + | (format #t "} | |
995 | + | trait LowestPriSequencer[Sequencer[_, _, _]]{ | |
996 | + | protected[this] def Sequencer0[A, B, C](f: (A, B) => C): Sequencer[A, B, C] | |
997 | + | implicit def Sequencer1[T1, T2]: Sequencer[T1, T2, (T1, T2)] = Sequencer0{case (t1, t2) => (t1, t2)} | |
998 | + | } | |
999 | + | "))) | |
1000 | + | #t)) | |
1001 | + | (replace 'build | |
1002 | + | (lambda _ | |
1003 | + | (mkdir-p "build/classes") | |
1004 | + | (mkdir-p "build/jar") | |
1005 | + | (apply invoke "scalac" "-classpath" (getenv "CLASSPATH") | |
1006 | + | "-d" "build/classes" | |
1007 | + | (find-files "fastparse/src" ".*.scala$")) | |
1008 | + | (invoke "jar" "cf" "build/jar/fastparse.jar" "-C" "build/classes" ".") | |
1009 | + | #t)) | |
1010 | + | (replace 'install | |
1011 | + | (install-jars "build"))))) | |
1012 | + | (inputs | |
1013 | + | `(("scala-sourcecode" ,scala-sourcecode))) | |
1014 | + | (native-inputs | |
1015 | + | `(("scala" ,scala-official))) | |
1016 | + | (home-page "") | |
1017 | + | (synopsis "") | |
1018 | + | (description "") | |
1019 | + | (license license:expat))) | |
1020 | + | ||
1021 | + | (define-public scala-fastparse1 | |
1022 | + | (package | |
1023 | + | (inherit scala-fastparse) | |
1024 | + | (version "1.0.0") | |
1025 | + | (source (origin | |
1026 | + | (method url-fetch) | |
1027 | + | (uri (string-append "https://github.com/lihaoyi/fastparse/archive/" | |
1028 | + | version ".tar.gz")) | |
1029 | + | (file-name (string-append "scala-fastparse-" version ".tar.gz")) | |
1030 | + | (sha256 | |
1031 | + | (base32 | |
1032 | + | "14d44f23hl6ypfwlvnzkzcvv52a0xipm5wkp2glr184aik7w5pnb")))) | |
1033 | + | (arguments | |
1034 | + | `(#:tests? #f; in fastpares/test/src | |
1035 | + | #:modules | |
1036 | + | ((guix build ant-build-system) | |
1037 | + | (guix build java-utils) | |
1038 | + | (guix build utils) | |
1039 | + | (srfi srfi-1)) | |
1040 | + | #:imported-modules | |
1041 | + | ((srfi srfi-1) ; for iota | |
1042 | + | ,@%ant-build-system-modules) | |
1043 | + | #:phases | |
1044 | + | (modify-phases %standard-phases | |
1045 | + | (add-before 'build 'copy-compat | |
1046 | + | (lambda _ | |
1047 | + | (with-directory-excursion "utils/shared/src/main" | |
1048 | + | (copy-file "scala-2.11/fastparse/utils/Compat.scala" | |
1049 | + | "scala/fastparse/utils/Compat.scala")) | |
1050 | + | #t)) | |
1051 | + | (add-before 'build 'generate-sources | |
1052 | + | (lambda _ | |
1053 | + | (define (tuple num) | |
1054 | + | (let* ((ts (map (lambda (n) (string-append "T" (number->string n))) | |
1055 | + | (iota num 1))) | |
1056 | + | (chunks (map (lambda (n) | |
1057 | + | (string-append "t._" (number->string n))) | |
1058 | + | (iota num 1))) | |
1059 | + | (chunkss (string-join chunks ", ")) | |
1060 | + | (tsD (string-join (reverse (cons "D" (reverse ts))) ",")) | |
1061 | + | (anys (string-join (map (const "Any") ts) ", ")) | |
1062 | + | (tss (string-join ts ", "))) | |
1063 | + | (format #t " | |
1064 | + | val BaseSequencer~a: Sequencer[(~a), Any, (~a, Any)] = | |
1065 | + | Sequencer0((t, d) => (~a, d)) | |
1066 | + | implicit def Sequencer~a[~a]: Sequencer[(~a), D, (~a)] = | |
1067 | + | BaseSequencer~a.asInstanceOf[Sequencer[(~a), D, (~a)]] | |
1068 | + | " num anys anys chunkss num tsD tss tsD num tss tsD))) | |
1069 | + | (with-output-to-file | |
1070 | + | "fastparse/shared/src/main/scala/fastparse/core/SequencerGen.scala" | |
1071 | + | (lambda _ | |
1072 | + | (format #t "package fastparse.core | |
1073 | + | trait SequencerGen[Sequencer[_, _, _]] extends LowestPriSequencer[Sequencer]{ | |
1074 | + | protected[this] def Sequencer0[A, B, C](f: (A, B) => C): Sequencer[A, B, C] | |
1075 | + | ") | |
1076 | + | (for-each tuple (iota 20 2)) | |
1077 | + | (format #t "} | |
1078 | + | trait LowestPriSequencer[Sequencer[_, _, _]]{ | |
1079 | + | protected[this] def Sequencer0[A, B, C](f: (A, B) => C): Sequencer[A, B, C] | |
1080 | + | implicit def Sequencer1[T1, T2]: Sequencer[T1, T2, (T1, T2)] = Sequencer0{case (t1, t2) => (t1, t2)} | |
1081 | + | } | |
1082 | + | "))) | |
1083 | + | #t)) | |
1084 | + | (replace 'build | |
1085 | + | (lambda _ | |
1086 | + | (mkdir-p "build/classes") | |
1087 | + | (mkdir-p "build/jar") | |
1088 | + | (apply invoke "scalac" "-classpath" (getenv "CLASSPATH") | |
1089 | + | "-d" "build/classes" | |
1090 | + | (find-files "utils/shared/src/main/scala" ".*.scala$")) | |
1091 | + | (apply invoke "scalac" "-classpath" | |
1092 | + | (string-append (getenv "CLASSPATH") ":build/classes") | |
1093 | + | "-d" "build/classes" | |
1094 | + | (find-files "fastparse/shared/src/main/scala" ".*.scala$")) | |
1095 | + | (invoke "jar" "cf" "build/jar/fastparse.jar" "-C" "build/classes" ".") | |
1096 | + | #t)) | |
1097 | + | (replace 'install | |
1098 | + | (install-jars "build"))))) | |
1099 | + | (inputs | |
1100 | + | `(("scala-acyclic" ,scala-acyclic) | |
1101 | + | ("scala-sourcecode" ,scala-sourcecode))))) | |
1102 | + | ||
1103 | + | ;; LICENSE? | |
1104 | + | (define-public scala-protobuf | |
1105 | + | (package | |
1106 | + | (name "scala-protobuf") | |
1107 | + | (version "0.8.3") | |
1108 | + | (source (origin | |
1109 | + | (method url-fetch) | |
1110 | + | (uri (string-append "https://github.com/scalapb/ScalaPB/archive/v" | |
1111 | + | version ".tar.gz")) | |
1112 | + | (file-name (string-append name "-" version ".tar.gz")) | |
1113 | + | (sha256 | |
1114 | + | (base32 | |
1115 | + | "0x6mfpyhzxh54dxh1pj3x952gyvp05m7vkj0c3p8ssx214r327kj")) | |
1116 | + | (modules '((guix build utils))) | |
1117 | + | (snippet | |
1118 | + | `(delete-file-recursively "third_party")))) | |
1119 | + | (build-system ant-build-system) | |
1120 | + | (arguments | |
1121 | + | `(#:tests? #f; TODO | |
1122 | + | #:phases | |
1123 | + | (modify-phases %standard-phases | |
1124 | + | (add-before 'build 'generate-sources | |
1125 | + | (lambda _ | |
1126 | + | (with-output-to-file "compiler-plugin/src/main/scala/scalapb/compiler/Version.scala" | |
1127 | + | (lambda _ | |
1128 | + | (format #t "package scalapb.compiler | |
1129 | + | object Version { | |
1130 | + | val scalapbVersion = \"~a\" | |
1131 | + | val protobufVersion = \"~a\" | |
1132 | + | val grpcJavaVersion = \"~a\" | |
1133 | + | }" ,version ,(package-version protobuf) "TODO"))) | |
1134 | + | (mkdir-p "compiler-plugin/src/main/scala/scalapb/compiler/internal") | |
1135 | + | (copy-file | |
1136 | + | "scalapb-runtime/shared/src/main/scala/scalapb/Encoding.scala" | |
1137 | + | "compiler-plugin/src/main/scala/scalapb/compiler/internal/Encoding.scala") | |
1138 | + | (substitute* "compiler-plugin/src/main/scala/scalapb/compiler/internal/Encoding.scala" | |
1139 | + | (("package scalapb") "package scalapb.internal")) | |
1140 | + | #t)) | |
1141 | + | (add-before 'build 'merge-runtime | |
1142 | + | (lambda _ | |
1143 | + | (copy-recursively "scalapb-runtime/shared/src" "scalapb-runtime/src") | |
1144 | + | (copy-recursively "scalapb-runtime/jvm/src" "scalapb-runtime/src") | |
1145 | + | #t)) | |
1146 | + | (add-before 'build 'copy-compat | |
1147 | + | (lambda _ | |
1148 | + | (with-directory-excursion "scalapb-runtime/src/main" | |
1149 | + | (copy-file "scala-2.11/scalapb/textformat/ParserCompat.scala" | |
1150 | + | "scala/scalapb/textformat/ParserCompat.scala")) | |
1151 | + | #t)) | |
1152 | + | (replace 'build | |
1153 | + | ,(sbt-building-phase | |
1154 | + | '(("lenses/" "shared") | |
1155 | + | ("" "scalapb-runtime") | |
1156 | + | ("" "compiler-plugin") | |
1157 | + | ("" "scalapbc")))) | |
1158 | + | (replace 'install | |
1159 | + | (install-jars "build")) | |
1160 | + | (add-after 'install 'install-bin | |
1161 | + | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1162 | + | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
1163 | + | (mkdir-p bin) | |
1164 | + | (with-output-to-file (string-append bin "/scalapbc") | |
1165 | + | (lambda _ | |
1166 | + | (format #t "#!~a | |
1167 | + | java -cp ~a scalapb.ScalaPBC $@\n" (which "bash") | |
1168 | + | (string-join | |
1169 | + | (append | |
1170 | + | (find-files (assoc-ref outputs "out") ".*.jar") | |
1171 | + | (find-files (assoc-ref inputs "java-protobuf") ".*.jar") | |
1172 | + | (find-files (assoc-ref inputs "java-protoc-jar") ".*.jar") | |
1173 | + | (find-files (assoc-ref inputs "scala-fastparse1") ".*.jar") | |
1174 | + | (find-files (assoc-ref inputs "scala-protoc-bridge") ".*.jar") | |
1175 | + | (find-files (assoc-ref inputs "scala-sourcecode") ".*.jar") | |
1176 | + | (find-files (assoc-ref inputs "scala") ".*.jar")) | |
1177 | + | ":")))) | |
1178 | + | (chmod (string-append bin "/scalapbc") #o755)) | |
1179 | + | #t))))) | |
1180 | + | (inputs | |
1181 | + | `(("java-protobuf" ,java-protobuf) | |
1182 | + | ("java-protoc-jar" ,java-protoc-jar) | |
1183 | + | ("scala-fastparse1" ,scala-fastparse1) | |
1184 | + | ("scala-protoc-bridge" ,scala-protoc-bridge) | |
1185 | + | ("scala-sourcecode" ,scala-sourcecode))) | |
1186 | + | (native-inputs | |
1187 | + | `(("protobuf" ,protobuf) | |
1188 | + | ("scala" ,scala-official))) | |
1189 | + | (home-page "") | |
1190 | + | (synopsis "") | |
1191 | + | (description "") | |
1192 | + | (license license:bsd-3))) | |
1193 | + | ||
1194 | + | (define-public sbt-sbinary | |
1195 | + | (package | |
1196 | + | (name "sbt-sbinary") | |
1197 | + | (version "0.5.0") | |
1198 | + | (source | |
1199 | + | (origin | |
1200 | + | (method url-fetch) | |
1201 | + | (uri (string-append "https://github.com/sbt/sbinary/archive/v" | |
1202 | + | version ".tar.gz")) | |
1203 | + | (file-name (string-append "sbt-util-" version ".tar.gz")) | |
1204 | + | (sha256 | |
1205 | + | (base32 | |
1206 | + | "12mcny4flfc6zbgncjwqljrsg6qw7azagkackyqcp4gmv9ssw99f")))) | |
1207 | + | (build-system ant-build-system) | |
1208 | + | (arguments | |
1209 | + | `(#:tests? #f | |
1210 | + | #:phases | |
1211 | + | (modify-phases %standard-phases | |
1212 | + | (add-before 'build 'generate-fmpp | |
1213 | + | (lambda _ | |
1214 | + | (invoke "fmpp" "-U" "all" "-S" "core/src/main/fmpp" "-O" | |
1215 | + | "core/src/main/scala") | |
1216 | + | #t)) | |
1217 | + | (replace 'build | |
1218 | + | (lambda* (#:key inputs #:allow-other-keys) | |
1219 | + | (mkdir-p "build/classes") | |
1220 | + | (apply invoke "scalac" "-classpath" | |
1221 | + | (string-append (getenv "CLASSPATH") ":build/util-interface") | |
1222 | + | "-d" "build/classes" | |
1223 | + | (append | |
1224 | + | (find-files "core/src/main/scala-2.13-" ".*.scala$") | |
1225 | + | (find-files "core/src/main/scala" ".*.scala$"))) | |
1226 | + | (invoke "jar" "cf" "sbt-sbinary.jar" "-C" "build/classes" ".") | |
1227 | + | #t)) | |
1228 | + | (replace 'install | |
1229 | + | (install-jars "."))))) | |
1230 | + | (native-inputs | |
1231 | + | `(("java-fmpp" ,java-fmpp) | |
1232 | + | ("scala" ,scala-official))) | |
1233 | + | (home-page "https://www.scala-sbt.org/") | |
1234 | + | (synopsis "") | |
1235 | + | (description "") | |
1236 | + | (license license:bsd-3))) | |
1237 | + | ||
1238 | + | (define-public sbt-zinc | |
1239 | + | (package | |
1240 | + | (name "sbt-zinc") | |
1241 | + | (version "1.2.5") | |
1242 | + | (source | |
1243 | + | (origin | |
1244 | + | (method url-fetch) | |
1245 | + | (uri (string-append "https://github.com/sbt/zinc/archive/v" | |
1246 | + | version ".tar.gz")) | |
1247 | + | (file-name (string-append name "-" version ".tar.gz")) | |
1248 | + | (sha256 | |
1249 | + | (base32 | |
1250 | + | "1b01nv3dk3g7jx59jnzp2m2va5brhmds4bpgp824fnmp2fdjzgl0")))) | |
1251 | + | (build-system ant-build-system) | |
1252 | + | (arguments | |
1253 | + | `(#:tests? #f | |
1254 | + | #:phases | |
1255 | + | (modify-phases %standard-phases | |
1256 | + | (add-before 'build 'generate-protobuf | |
1257 | + | (lambda _ | |
1258 | + | (invoke "scalapbc" | |
1259 | + | (string-append | |
1260 | + | "-v" | |
1261 | + | (string-delete #\. ,(package-version protobuf))) | |
1262 | + | "--scala_out=internal/zinc-persist/src/main/scala" | |
1263 | + | "internal/zinc-persist/src/main/protobuf/schema.proto") | |
1264 | + | #t)) | |
1265 | + | (replace 'build | |
1266 | + | ,(sbt-building-phase | |
1267 | + | '(("internal/" "compiler-interface") | |
1268 | + | ("internal/" "zinc-classpath") | |
1269 | + | ("internal/" "zinc-classfile") | |
1270 | + | ("internal/" "zinc-apiinfo") | |
1271 | + | ("internal/" "zinc-core") | |
1272 | + | ("internal/" "zinc-persist") | |
1273 | + | ("internal/" "zinc-compile-core") | |
1274 | + | ("" "zinc")))) | |
1275 | + | (replace 'install | |
1276 | + | (install-jars "."))))) | |
1277 | + | (inputs | |
1278 | + | `(("java-log4j-api" ,java-log4j-api-for-sbt) | |
1279 | + | ("java-log4j-core" ,java-log4j-core-for-sbt) | |
1280 | + | ("java-protobuf" ,java-protobuf) | |
1281 | + | ("sbt-io" ,sbt-io) | |
1282 | + | ("sbt-launcher" ,sbt-launcher) | |
1283 | + | ("sbt-librarymanagement" ,sbt-librarymanagement) | |
1284 | + | ("sbt-sbinary" ,sbt-sbinary) | |
1285 | + | ("sbt-util" ,sbt-util) | |
1286 | + | ("scala-protoc-bridge" ,scala-protoc-bridge) | |
1287 | + | ("scala-sjsonnew" ,scala-sjsonnew))) | |
1288 | + | (native-inputs | |
1289 | + | `(("scala-protobuf" ,scala-protobuf) | |
1290 | + | ("scala" ,scala-official))) | |
1291 | + | (home-page "") | |
1292 | + | (synopsis "") | |
1293 | + | (description "") | |
1294 | + | (license license:bsd-3))) | |
1295 | + | ||
821 | 1296 | (define-public sbt | |
822 | 1297 | (package | |
823 | 1298 | (name "sbt") | |
824 | - | (version "1.2.7") | |
1299 | + | (version "1.2.8") | |
825 | 1300 | (source | |
826 | 1301 | (origin | |
827 | 1302 | (method url-fetch) | |
… | |||
830 | 1305 | (file-name (string-append name "-" version ".tar.gz")) | |
831 | 1306 | (sha256 | |
832 | 1307 | (base32 | |
833 | - | "0i0j6dcgn80bajq05h739h0d7kgcz7zbfk6qsnln8qrcx1wgbf0q")))) | |
1308 | + | "0fpm9jcd84xjxlfdfh2iwz7544ksgqik6591i7nrzlamygmbfadr")))) | |
834 | 1309 | (build-system ant-build-system) | |
835 | 1310 | (arguments | |
836 | 1311 | `(#:tests? #f | |
837 | - | #:jdk ,icedtea-8 | |
838 | 1312 | #:phases | |
839 | 1313 | (modify-phases %standard-phases | |
840 | 1314 | (add-before 'build 'copy-resources | |
… | |||
894 | 1368 | (build-subproject "" "core-macros") | |
895 | 1369 | (build-subproject "" "tasks") | |
896 | 1370 | (build-subproject "" "tasks-standard") | |
1371 | + | (build-subproject "" "protocol") | |
1372 | + | (build-subproject "" "main-command") | |
897 | 1373 | (build-subproject "" "main-settings") | |
898 | 1374 | (build-subproject "" "sbt") | |
899 | 1375 | #t)) | |
900 | 1376 | (replace 'install | |
901 | 1377 | (install-jars "."))))) | |
902 | 1378 | (inputs | |
903 | - | `(("scala" ,scala-official) | |
1379 | + | `(("java-log4j-api" ,java-log4j-api-for-sbt) | |
1380 | + | ("java-log4j-core" ,java-log4j-core-for-sbt) | |
1381 | + | ("scala" ,scala-official) | |
904 | 1382 | ("scala-sjsonnew" ,scala-sjsonnew) | |
905 | 1383 | ("sbt-io" ,sbt-io) | |
1384 | + | ("sbt-launcher" ,sbt-launcher) | |
906 | 1385 | ("sbt-librarymanagement" ,sbt-librarymanagement) | |
907 | - | ("sbt-util-cache" ,sbt-util-cache) | |
908 | - | ("sbt-util-control" ,sbt-util-control) | |
909 | - | ("sbt-util-interface" ,sbt-util-interface) | |
910 | - | ("sbt-util-logging" ,sbt-util-logging) | |
911 | - | ("sbt-util-position" ,sbt-util-position))) | |
1386 | + | ("sbt-util" ,sbt-util) | |
1387 | + | ("sbt-zinc" ,sbt-zinc))) | |
912 | 1388 | (native-inputs | |
913 | 1389 | `(("scala-kind-projector" ,scala-kind-projector))) | |
914 | 1390 | (home-page "https://www.scala-sbt.org/") |