Use older intellij libraries for kotlin-0
more/packages/intellij.scm
17 | 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | 18 | ||
19 | 19 | (define-module (more packages intellij) | |
20 | + | #:use-module (ice-9 match) | |
21 | + | #:use-module (srfi srfi-1) | |
20 | 22 | #:use-module ((guix licenses) #:prefix license:) | |
21 | 23 | #:use-module (gnu packages) | |
22 | 24 | #:use-module (guix packages) | |
… | |||
34 | 36 | #:use-module (gnu packages compression) | |
35 | 37 | #:use-module (gnu packages docbook) | |
36 | 38 | #:use-module (gnu packages java) | |
39 | + | #:use-module (gnu packages java-compression) | |
37 | 40 | #:use-module (gnu packages maven) | |
38 | 41 | #:use-module (gnu packages perl) | |
39 | 42 | #:use-module (gnu packages web) | |
40 | 43 | #:use-module (gnu packages xml) | |
41 | 44 | #:use-module (more packages java)) | |
42 | 45 | ||
46 | + | (define intellij-community-2013-commit "8bc091c3131a888b5400c63a9e51eb0bc7fbe0fb") | |
47 | + | (define intellij-community-2013-version (git-version "0.0.0" "0" | |
48 | + | intellij-community-2013-commit)) | |
49 | + | ||
43 | 50 | ;; The release page on github is a mess | |
44 | 51 | (define intellij-community-version "182.5262.8") | |
45 | 52 | (define intellij-community-commit "e2a5d9273ec0b3b656c0dad0c9b07e5f85bbd61a") | |
46 | - | (define (intellij-community-source commit version) | |
53 | + | (define (get-intellij-community-source commit version hash) | |
47 | 54 | (origin | |
48 | 55 | (method git-fetch) | |
49 | 56 | (uri (git-reference | |
50 | 57 | (url "https://github.com/JetBrains/intellij-community") | |
51 | 58 | (commit commit))) | |
52 | 59 | (file-name (git-file-name "intellij" version)) | |
53 | - | (sha256 | |
54 | - | (base32 | |
55 | - | "17qzhh2kw6sxwkyj7ng7hrpbcf2rjs2xjbsrg1bgkg90r5kb8sm4")) | |
60 | + | (sha256 (base32 hash)) | |
56 | 61 | (modules '((guix build utils))) | |
57 | 62 | (snippet | |
58 | 63 | `(begin | |
… | |||
66 | 71 | (for-each delete-file (find-files "." ".*.jar$")) | |
67 | 72 | #t)))) | |
68 | 73 | ||
74 | + | (define intellij-community-source (get-intellij-community-source | |
75 | + | intellij-community-commit | |
76 | + | intellij-community-version | |
77 | + | "17qzhh2kw6sxwkyj7ng7hrpbcf2rjs2xjbsrg1bgkg90r5kb8sm4")) | |
78 | + | (define intellij-community-2013-source (get-intellij-community-source | |
79 | + | intellij-community-2013-commit | |
80 | + | intellij-community-2013-version | |
81 | + | "0z5rq713lf7q2x0c0sb0r1ha2pszcyygddh7r12wyzf5p0iiy1im")) | |
82 | + | ||
83 | + | (define (strip-intellij-variant variant-property base) | |
84 | + | (package | |
85 | + | (inherit base) | |
86 | + | (properties (alist-delete variant-property (package-properties base))))) | |
87 | + | ||
88 | + | (define (package-intellij-for-explicit-version version source variant-property base) | |
89 | + | (define variant | |
90 | + | (assq-ref (package-properties base) variant-property)) | |
91 | + | ||
92 | + | (define (map-inputs inputs) | |
93 | + | (map (lambda (input) | |
94 | + | (match input | |
95 | + | ((name input) | |
96 | + | (if (and | |
97 | + | (> (string-length name) 13) | |
98 | + | (equal? (substring name 0 13) "java-intellij")) | |
99 | + | `(,name ,(package-intellij-for-explicit-version | |
100 | + | version source variant-property input)) | |
101 | + | `(,name ,input))))) | |
102 | + | inputs)) | |
103 | + | ||
104 | + | (cond | |
105 | + | (variant => force) | |
106 | + | (else | |
107 | + | (package | |
108 | + | (inherit base) | |
109 | + | (version version) | |
110 | + | (source source) | |
111 | + | (propagated-inputs (map-inputs (package-propagated-inputs base))) | |
112 | + | (inputs (map-inputs (package-inputs base))))))) | |
113 | + | ||
114 | + | (define-public (intellij-2013-package base) | |
115 | + | (package-intellij-for-explicit-version intellij-community-2013-version | |
116 | + | intellij-community-2013-source | |
117 | + | 'intellij-2013-variant | |
118 | + | base)) | |
119 | + | (define-public (strip-2013-variant base) | |
120 | + | (strip-intellij-variant 'intellij-2013-variant base)) | |
121 | + | ||
69 | 122 | (define-public java-intellij-compiler-instrumentation-util | |
70 | 123 | (package | |
71 | 124 | (name "java-intellij-compiler-instrumentation-util") | |
72 | 125 | (version intellij-community-version) | |
73 | - | (source (intellij-community-source intellij-community-commit version)) | |
126 | + | (source intellij-community-source) | |
74 | 127 | (build-system ant-build-system) | |
75 | 128 | (arguments | |
76 | 129 | `(#:source-dir "java/compiler/instrumentation-util/src" | |
… | |||
96 | 149 | (package | |
97 | 150 | (name "java-intellij-compiler-javac2") | |
98 | 151 | (version intellij-community-version) | |
99 | - | (source (intellij-community-source intellij-community-commit version)) | |
152 | + | (source intellij-community-source) | |
100 | 153 | (build-system ant-build-system) | |
101 | 154 | (arguments | |
102 | 155 | `(#:source-dir "java/compiler/javac2/src" | |
… | |||
114 | 167 | (package | |
115 | 168 | (name "java-intellij-platform-forms-rt") | |
116 | 169 | (version intellij-community-version) | |
117 | - | (source (intellij-community-source intellij-community-commit version)) | |
170 | + | (source intellij-community-source) | |
118 | 171 | (build-system ant-build-system) | |
119 | 172 | (arguments | |
120 | 173 | `(#:source-dir "platform/forms_rt/src" | |
… | |||
130 | 183 | (package | |
131 | 184 | (name "java-intellij-platform-util-rt") | |
132 | 185 | (version intellij-community-version) | |
133 | - | (source (intellij-community-source intellij-community-commit version)) | |
186 | + | (source intellij-community-source) | |
134 | 187 | (build-system ant-build-system) | |
135 | 188 | (arguments | |
136 | 189 | `(#:source-dir "platform/util-rt/src" | |
… | |||
149 | 202 | (package | |
150 | 203 | (name "java-intellij-platform-util") | |
151 | 204 | (version intellij-community-version) | |
152 | - | (source (intellij-community-source intellij-community-commit version)) | |
205 | + | (source intellij-community-source) | |
153 | 206 | (build-system ant-build-system) | |
154 | 207 | (arguments | |
155 | 208 | `(#:source-dir "platform/util/src" | |
… | |||
168 | 221 | (delete-file "platform/util/src/com/intellij/util/ui/IsRetina.java") | |
169 | 222 | #t))))) | |
170 | 223 | (propagated-inputs | |
171 | - | `(("java-batik" ,java-batik) | |
224 | + | `(("java-batik-1.7" ,java-batik-1.7) | |
172 | 225 | ("java-commons-compress" ,java-commons-compress) | |
173 | 226 | ("java-imagescalr" ,java-imagescalr) | |
174 | 227 | ("java-intellij-platform-util-rt" ,java-intellij-platform-util-rt) | |
… | |||
182 | 235 | ("java-native-access-platform" ,java-native-access-platform) | |
183 | 236 | ("java-trove4j-intellij" ,java-trove4j-intellij) | |
184 | 237 | ("java-w3c-svg" ,java-w3c-svg))) | |
238 | + | (properties | |
239 | + | `((intellij-2013-variant . ,(delay java-intellij-platform-util-2013)))) | |
185 | 240 | (home-page "https://github.com/JetBrains/intellij-community") | |
186 | 241 | (synopsis "") | |
187 | 242 | (description "") | |
188 | 243 | (license license:asl2.0))) | |
189 | 244 | ||
245 | + | (define-public java-intellij-platform-util-2013 | |
246 | + | (let ((base (intellij-2013-package (strip-2013-variant java-intellij-platform-util)))) | |
247 | + | (package | |
248 | + | (inherit base) | |
249 | + | (propagated-inputs | |
250 | + | (append (alist-delete "java-jdom-for-intellij" (package-propagated-inputs base)) | |
251 | + | `(("java-batik" ,java-batik) | |
252 | + | ("java-iq80-snappy" ,java-iq80-snappy) | |
253 | + | ("java-jdom1-for-intellij" ,java-jdom1-for-intellij)))) | |
254 | + | (arguments | |
255 | + | (substitute-keyword-arguments (package-arguments base) | |
256 | + | ((#:phases phases) | |
257 | + | `(modify-phases ,phases | |
258 | + | (add-before 'build 'fix-implicit-conversions | |
259 | + | (lambda _ | |
260 | + | (substitute* "build.xml" | |
261 | + | (("<javac") "<javac source=\"1.6\"")))) | |
262 | + | (delete 'remove-apple)))))))) | |
263 | + | ;(lambda _ | |
264 | + | ; (delete-file "platform/util/src/com/intellij/util/AppleHiDPIScaledImage.java") | |
265 | + | ; (delete-file "platform/util/src/com/intellij/util/ui/IsRetina.java") | |
266 | + | ; (delete-file "platform/util/src/com/intellij/util/RetinaImage.java") | |
267 | + | ; (substitute* "platform/util/src/com/intellij/util/ui/UIUtil.java" | |
268 | + | ; (("IsRetina.isRetina\\(\\)") "false")) | |
269 | + | ; #t))))))))) | |
270 | + | ||
190 | 271 | (define-public java-intellij-platform-extensions | |
191 | 272 | (package | |
192 | 273 | (name "java-intellij-platform-extensions") | |
193 | 274 | (version intellij-community-version) | |
194 | - | (source (intellij-community-source intellij-community-commit version)) | |
275 | + | (source intellij-community-source) | |
195 | 276 | (build-system ant-build-system) | |
196 | 277 | (arguments | |
197 | 278 | `(#:source-dir "platform/extensions/src" | |
… | |||
211 | 292 | (package | |
212 | 293 | (name "java-intellij-platform-core-api") | |
213 | 294 | (version intellij-community-version) | |
214 | - | (source (intellij-community-source intellij-community-commit version)) | |
295 | + | (source intellij-community-source) | |
215 | 296 | (build-system ant-build-system) | |
216 | 297 | (arguments | |
217 | 298 | `(#:source-dir "platform/core-api/src" | |
… | |||
235 | 316 | (package | |
236 | 317 | (name "java-intellij-platform-core-impl") | |
237 | 318 | (version intellij-community-version) | |
238 | - | (source (intellij-community-source intellij-community-commit version)) | |
319 | + | (source intellij-community-source) | |
239 | 320 | (build-system ant-build-system) | |
240 | 321 | (arguments | |
241 | 322 | `(#:source-dir "platform/core-impl/src" | |
… | |||
254 | 335 | (package | |
255 | 336 | (name "java-intellij-java-psi-api") | |
256 | 337 | (version intellij-community-version) | |
257 | - | (source (intellij-community-source intellij-community-commit version)) | |
338 | + | (source intellij-community-source) | |
258 | 339 | (build-system ant-build-system) | |
259 | 340 | (arguments | |
260 | 341 | `(#:source-dir "java/java-psi-api/src" | |
… | |||
281 | 362 | (package | |
282 | 363 | (name "java-intellij-java-psi-impl") | |
283 | 364 | (version intellij-community-version) | |
284 | - | (source (intellij-community-source intellij-community-commit version)) | |
365 | + | (source intellij-community-source) | |
285 | 366 | (build-system ant-build-system) | |
286 | 367 | (arguments | |
287 | 368 | ;; TODO: remove these auto-generated files and generate them with | |
… | |||
323 | 404 | (package | |
324 | 405 | (name "java-intellij-platform-resources") | |
325 | 406 | (version intellij-community-version) | |
326 | - | (source (intellij-community-source intellij-community-commit version)) | |
407 | + | (source intellij-community-source) | |
327 | 408 | (build-system ant-build-system) | |
328 | 409 | (arguments | |
329 | 410 | ;; TODO: remove these auto-generated files and generate them with | |
… | |||
352 | 433 | (package | |
353 | 434 | (name "java-intellij-resources") | |
354 | 435 | (version intellij-community-version) | |
355 | - | (source (intellij-community-source intellij-community-commit version)) | |
436 | + | (source intellij-community-source) | |
356 | 437 | (build-system ant-build-system) | |
357 | 438 | (arguments | |
358 | 439 | ;; TODO: remove these auto-generated files and generate them with | |
… | |||
442 | 523 | (package | |
443 | 524 | (name "java-intellij-compiler-forms-compiler") | |
444 | 525 | (version intellij-community-version) | |
445 | - | (source (intellij-community-source intellij-community-commit version)) | |
526 | + | (source intellij-community-source) | |
446 | 527 | (build-system ant-build-system) | |
447 | 528 | (arguments | |
448 | 529 | `(#:source-dir "java/compiler/forms-compiler/src" |
more/packages/java.scm
2173 | 2173 | (install-file "build/jdom.jar" jar-dir) | |
2174 | 2174 | #t)))))))) | |
2175 | 2175 | ||
2176 | + | ;; One commit before the rename to jdom2 | |
2177 | + | ;; How to find the version that's supposed to be used though? | |
2178 | + | (define-public java-jdom1-for-intellij | |
2179 | + | (package | |
2180 | + | (inherit java-jdom) | |
2181 | + | (version "1.1.1-intellij") | |
2182 | + | (source (origin | |
2183 | + | (method git-fetch) | |
2184 | + | (uri (git-reference | |
2185 | + | (url "https://github.com/JetBrains/intellij-deps-jdom") | |
2186 | + | (commit "fac95752180b2e0e27fe6539cad819623d50975a"))) | |
2187 | + | (file-name (git-file-name "java-jdom" version)) | |
2188 | + | (sha256 | |
2189 | + | (base32 | |
2190 | + | "1iyqysa71fjhnr5q61cbx1q6brkx4mpbvg33zzrhagjmkslw2axn")) | |
2191 | + | (modules '((guix build utils))) | |
2192 | + | (snippet | |
2193 | + | `(begin | |
2194 | + | (for-each delete-file (find-files "." ".*.jar$")) | |
2195 | + | #t)))) | |
2196 | + | (arguments | |
2197 | + | `(#:jar-name "jdom.jar" | |
2198 | + | #:tests? #f | |
2199 | + | #:source-dir "core/src/java")) | |
2200 | + | (inputs | |
2201 | + | `(("java-jaxen" ,java-jaxen))) | |
2202 | + | (native-inputs | |
2203 | + | (append (package-native-inputs java-jdom) | |
2204 | + | `(("unzip" ,unzip)))))) | |
2205 | + | ||
2176 | 2206 | (define-public java-jdom-for-intellij | |
2177 | 2207 | (package | |
2178 | 2208 | (inherit java-jdom) | |
… | |||
6730 | 6760 | (description "") | |
6731 | 6761 | (license license:asl2.0))) | |
6732 | 6762 | ||
6763 | + | (define-public java-batik-1.7 | |
6764 | + | (package | |
6765 | + | (inherit java-batik) | |
6766 | + | (name "java-batik") | |
6767 | + | (version "1.7") | |
6768 | + | (source (origin | |
6769 | + | (method url-fetch) | |
6770 | + | (uri (string-append "mirror://apache/xmlgraphics/batik/source/" | |
6771 | + | "batik-src-" version ".zip")) | |
6772 | + | (sha256 | |
6773 | + | (base32 | |
6774 | + | "1zbrffb8xrddb41sn8fzq40wxc5i8177cl9nm0gmd5x78csmkskb")))) | |
6775 | + | (native-inputs | |
6776 | + | (append (package-native-inputs java-batik) | |
6777 | + | `(("unzip" ,unzip)))) | |
6778 | + | (arguments | |
6779 | + | `(#:test-target "regard"; FIXME: no test is actually run | |
6780 | + | #:build-target "all-jar" | |
6781 | + | #:phases | |
6782 | + | (modify-phases %standard-phases | |
6783 | + | (add-before 'check 'remove-failing | |
6784 | + | (lambda _ | |
6785 | + | ;; This file looks for w3c.dom.Window, but it has been moved to | |
6786 | + | ;; org.apache.batik.w3c.dom.Window. | |
6787 | + | (delete-file "samples/tests/resources/java/sources/com/untrusted/script/UntrustedScriptHandler.java") | |
6788 | + | #t)) | |
6789 | + | (replace 'install | |
6790 | + | (lambda* (#:key outputs #:allow-other-keys) | |
6791 | + | (let ((dir (string-append (assoc-ref outputs "out") "/share/java/"))) | |
6792 | + | (mkdir-p dir) | |
6793 | + | (copy-file (string-append "batik-" ,version "/lib/batik-all.jar") | |
6794 | + | (string-append dir "batik-all.jar")))))))))) | |
6795 | + | ||
6733 | 6796 | (define-public java-xmlgraphics-commons | |
6734 | 6797 | (package | |
6735 | 6798 | (name "java-xmlgraphics-commons") |
more/packages/kotlin.scm
149 | 149 | ("java-asm-commons" ,java-asm-commons-7) | |
150 | 150 | ("java-former-dart-ast" ,java-former-dart-ast) | |
151 | 151 | ("java-guava" ,java-guava) | |
152 | - | ("java-intellij-java-psi-api" ,java-intellij-java-psi-api) | |
153 | - | ("java-intellij-java-psi-impl" ,java-intellij-java-psi-impl) | |
154 | - | ("java-intellij-platform-core-api" ,java-intellij-platform-core-api) | |
155 | - | ("java-intellij-platform-core-impl" ,java-intellij-platform-core-impl) | |
156 | - | ("java-intellij-platform-extensions" ,java-intellij-platform-extensions) | |
157 | - | ("java-intellij-platform-util" ,java-intellij-platform-util) | |
158 | - | ("java-intellij-platform-util-rt" ,java-intellij-platform-util-rt) | |
152 | + | ("java-intellij-java-psi-api" ,(intellij-2013-package java-intellij-java-psi-api)) | |
153 | + | ("java-intellij-java-psi-impl" ,(intellij-2013-package java-intellij-java-psi-impl)) | |
154 | + | ("java-intellij-platform-core-api" ,(intellij-2013-package java-intellij-platform-core-api)) | |
155 | + | ("java-intellij-platform-core-impl" ,(intellij-2013-package java-intellij-platform-core-impl)) | |
156 | + | ("java-intellij-platform-extensions" ,(intellij-2013-package java-intellij-platform-extensions)) | |
157 | + | ("java-intellij-platform-util" ,(intellij-2013-package java-intellij-platform-util)) | |
158 | + | ("java-intellij-platform-util-rt" ,(intellij-2013-package java-intellij-platform-util-rt)) | |
159 | 159 | ("java-javax-inject" ,java-javax-inject) | |
160 | 160 | ("java-jline-2" ,java-jline-2) | |
161 | 161 | ("java-jsr305" ,java-jsr305) |