guix-more/more/packages/intellij.scm

intellij.scm

1
;;; GNU Guix --- Functional package management for GNU
2
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
3
;;;
4
;;; This file is part of GNU Guix.
5
;;;
6
;;; GNU Guix is free software; you can redistribute it and/or modify it
7
;;; under the terms of the GNU General Public License as published by
8
;;; the Free Software Foundation; either version 3 of the License, or (at
9
;;; your option) any later version.
10
;;;
11
;;; GNU Guix is distributed in the hope that it will be useful, but
12
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
;;; GNU General Public License for more details.
15
;;;
16
;;; You should have received a copy of the GNU General Public License
17
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
18
19
(define-module (more packages intellij)
20
  #:use-module (ice-9 match)
21
  #:use-module (srfi srfi-1)
22
  #:use-module ((guix licenses) #:prefix license:)
23
  #:use-module (gnu packages)
24
  #:use-module (guix packages)
25
  #:use-module (guix download)
26
  #:use-module (guix git-download)
27
  #:use-module (guix svn-download)
28
  #:use-module (guix cvs-download)
29
  #:use-module (guix utils)
30
  #:use-module (guix build-system ant)
31
  #:use-module (guix build-system gnu)
32
  #:use-module (guix build-system trivial)
33
  #:use-module (gnu packages autotools)
34
  #:use-module (gnu packages base)
35
  #:use-module (gnu packages batik)
36
  #:use-module (gnu packages compression)
37
  #:use-module (gnu packages docbook)
38
  #:use-module (gnu packages java)
39
  #:use-module (gnu packages java-compression)
40
  #:use-module (gnu packages maven)
41
  #:use-module (gnu packages perl)
42
  #:use-module (gnu packages web)
43
  #:use-module (gnu packages xml)
44
  #:use-module (more packages java))
45
46
(define intellij-community-130-commit "de6f73b5706c3c23c8f46bcf3761e48fa3e0f95b")
47
(define intellij-community-130-version (git-version "130" "0"
48
                                                     intellij-community-130-commit))
49
50
;; The release page on github is a mess
51
(define intellij-community-version "182.5262.8")
52
(define intellij-community-commit "e2a5d9273ec0b3b656c0dad0c9b07e5f85bbd61a")
53
(define (get-intellij-community-source commit version hash)
54
  (origin
55
    (method git-fetch)
56
    (uri (git-reference
57
           (url "https://github.com/JetBrains/intellij-community")
58
           (commit commit)))
59
    (file-name (git-file-name "intellij" version))
60
    (sha256 (base32 hash))
61
    (modules '((guix build utils)))
62
    (snippet
63
      `(begin
64
         (for-each
65
           (lambda (file)
66
             (if (file-exists? file)
67
               (delete-file-recursively file)))
68
           (append (find-files "." "^lib$" #:directories? #t)
69
                   (find-files "." "^bin$" #:directories? #t)))
70
         (delete-file "build.xml")
71
         (for-each delete-file (find-files "." ".*.jar$"))
72
         #t))))
73
74
(define intellij-community-source (get-intellij-community-source
75
                                    intellij-community-commit
76
                                    intellij-community-version
77
                                    "17qzhh2kw6sxwkyj7ng7hrpbcf2rjs2xjbsrg1bgkg90r5kb8sm4"))
78
(define intellij-community-130-source (get-intellij-community-source
79
				       intellij-community-130-commit
80
				       intellij-community-130-version
81
				       "153sasksydpm0i8ppmg71fdh17ycnvdz3mny987vmq4jdm0a4djp"))
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-130-package base)
115
  (package-intellij-for-explicit-version intellij-community-130-version
116
                                         intellij-community-130-source
117
                                         'intellij-130-variant
118
                                         base))
119
(define-public (strip-130-variant base)
120
  (strip-intellij-variant 'intellij-130-variant base))
121
122
(define-public java-intellij-compiler-instrumentation-util
123
  (package
124
    (name "java-intellij-compiler-instrumentation-util")
125
    (version intellij-community-version)
126
    (source intellij-community-source)
127
    (build-system ant-build-system)
128
    (arguments
129
     `(#:source-dir "java/compiler/instrumentation-util/src"
130
       #:jar-name "instrumentation-util.jar"
131
       ;; No test
132
       #:tests? #f
133
       #:phases
134
       (modify-phases %standard-phases
135
         (add-before 'build 'fix-imports
136
           (lambda _
137
             (substitute* (find-files "java/compiler/instrumentation-util/src" ".*.java")
138
               (("org.jetbrains.org.objectweb") "org.objectweb")
139
                ;; As in build/asm/3_api_version.patch
140
               (("API_VERSION") "ASM6")))))))
141
    (inputs
142
     `(("java-asm" ,java-asm)))
143
    (home-page "https://github.com/JetBrains/intellij-community")
144
    (synopsis "")
145
    (description "")
146
    (license license:asl2.0)))
147
148
(define-public java-jdom-for-intellij-130
149
  (package
150
    (inherit java-jdom)
151
    (version "0")
152
    (source (origin
153
              (method url-fetch)
154
              (uri (string-append "https://github.com/JetBrains/"
155
                                  "intellij-community/raw/"
156
                                  intellij-community-130-commit
157
                                  "/lib/src/jdom.zip"))
158
              (sha256
159
               (base32
160
                "0yvs1bxxbpa11bnvhdhi11mnps1qbgg3qw7s8zw24s8wabznjn6a"))))
161
    (arguments
162
     `(#:jar-name "jdom.jar"
163
       #:source-dir ".."
164
       #:tests? #f))
165
    (inputs
166
     `(("java-jaxen" ,java-jaxen)))
167
    (native-inputs
168
     `(("unzip" ,unzip)))))
169
170
(define-public java-jsr166e-for-intellij-130
171
  (package
172
    (name "java-jsr166e")
173
    (version "0")
174
    (source (origin
175
              (method url-fetch)
176
              (uri (string-append "https://github.com/JetBrains/"
177
                                  "intellij-community/raw/"
178
                                  intellij-community-130-commit
179
                                  "/lib/src/jsr166e_src.jar"))
180
              (sha256
181
               (base32
182
                "0ifiszqz57c1i90fhhprfll5jribh7s4wq1qnmkl9454pcdawrzp"))))
183
    (build-system ant-build-system)
184
    (arguments
185
     `(#:jar-name "jsr166e.jar"
186
       #:source-dir ".."
187
       #:jdk ,icedtea-7
188
       #:tests? #f))
189
    (home-page "")
190
    (synopsis "")
191
    (description "")
192
    (license license:cc0)))
193
194
(define-public java-intellij-compiler-javac2
195
  (package
196
    (name "java-intellij-compiler-javac2")
197
    (version intellij-community-version)
198
    (source intellij-community-source)
199
    (build-system ant-build-system)
200
    (arguments
201
     `(#:source-dir "java/compiler/javac2/src"
202
       #:jar-name "javac2.jar"
203
       ;; No test
204
       #:tests? #f))
205
    (inputs
206
     `(("java-intellij-compiler-instrumentation-util" ,java-intellij-compiler-instrumentation-util)))
207
    (home-page "https://github.com/JetBrains/intellij-community")
208
    (synopsis "")
209
    (description "")
210
    (license license:asl2.0)))
211
212
(define-public java-intellij-platform-forms-rt
213
  (package
214
    (name "java-intellij-platform-forms-rt")
215
    (version intellij-community-version)
216
    (source intellij-community-source)
217
    (build-system ant-build-system)
218
    (arguments
219
     `(#:source-dir "platform/forms_rt/src"
220
       #:jar-name "forms_rt.jar"
221
       ;; No test
222
       #:tests? #f))
223
    (home-page "https://github.com/JetBrains/intellij-community")
224
    (synopsis "")
225
    (description "")
226
    (license license:asl2.0)))
227
228
(define-public java-intellij-platform-util-rt
229
  (package
230
    (name "java-intellij-platform-util-rt")
231
    (version intellij-community-version)
232
    (source intellij-community-source)
233
    (build-system ant-build-system)
234
    (arguments
235
     `(#:source-dir "platform/util-rt/src"
236
       #:jar-name "intellij.platform.util-rt.jar"
237
       #:jdk ,icedtea-7
238
       ;; No test
239
       #:tests? #f))
240
    (inputs
241
     `(("java-jetbrains-annotations" ,java-jetbrains-annotations)))
242
    (home-page "https://github.com/JetBrains/intellij-community")
243
    (synopsis "")
244
    (description "")
245
    (license license:asl2.0)))
246
247
(define-public java-intellij-platform-util
248
  (package
249
    (name "java-intellij-platform-util")
250
    (version intellij-community-version)
251
    (source intellij-community-source)
252
    (build-system ant-build-system)
253
    (arguments
254
     `(#:source-dir "platform/util/src"
255
       #:jar-name "intellij.platform.util.jar"
256
       ;; No test
257
       #:tests? #f
258
       #:phases
259
       (modify-phases %standard-phases
260
         (add-before 'build 'copy-resources
261
           (lambda _
262
             (copy-recursively "platform/util/resources" "build/classes")
263
             #t))
264
         (add-before 'build 'remove-apple
265
           (lambda _
266
             (delete-file "platform/util/src/com/intellij/util/AppleHiDPIScaledImage.java")
267
             (delete-file "platform/util/src/com/intellij/util/ui/IsRetina.java")
268
             #t)))))
269
    (propagated-inputs
270
     `(("java-batik" ,java-batik)
271
       ("java-commons-compress" ,java-commons-compress)
272
       ("java-imagescalr" ,java-imagescalr)
273
       ("java-intellij-platform-util-rt" ,java-intellij-platform-util-rt)
274
       ("java-jakarta-oro" ,java-jakarta-oro)
275
       ("java-jdom-for-intellij" ,java-jdom-for-intellij)
276
       ("java-jetbrains-annotations" ,java-jetbrains-annotations)
277
       ("java-log4j-api" ,java-log4j-api)
278
       ("java-log4j-1.2-api" ,java-log4j-1.2-api)
279
       ("java-lz4" ,java-lz4)
280
       ("java-native-access" ,java-native-access)
281
       ("java-native-access-platform" ,java-native-access-platform)
282
       ("java-trove4j-intellij" ,java-trove4j-intellij)
283
       ("java-w3c-svg" ,java-w3c-svg)))
284
    (properties
285
     `((intellij-130-variant . ,(delay java-intellij-platform-util-130))))
286
    (home-page "https://github.com/JetBrains/intellij-community")
287
    (synopsis "")
288
    (description "")
289
    (license license:asl2.0)))
290
291
(define-public java-intellij-platform-util-130
292
  (let ((base (intellij-130-package (strip-130-variant java-intellij-platform-util))))
293
    (package
294
      (inherit base)
295
      (propagated-inputs
296
       (append (alist-delete "java-jdom-for-intellij" (package-propagated-inputs base))
297
               `(("java-asm" ,java-asm)
298
                 ("java-batik-1.7" ,java-batik-1.7)
299
                 ("java-cglib" ,java-cglib)
300
                 ("java-iq80-snappy" ,java-iq80-snappy)
301
                 ("java-jdom" ,java-jdom-for-intellij-130)
302
                 ("java-jsr166e-for-intellij-130" ,java-jsr166e-for-intellij-130)
303
                 ("java-picocontainer-1" ,java-picocontainer-1)
304
                 ("java-xstream" ,java-xstream))))
305
      (inputs
306
       `(("java-eawtstub" ,java-eawtstub)))
307
      (arguments
308
       `(;#:jdk ,icedtea-7
309
         ,@(substitute-keyword-arguments (package-arguments base)
310
            ((#:phases phases)
311
             `(modify-phases ,phases
312
                (delete 'remove-apple)
313
                (add-before 'build 'fix-newer-jdk
314
                  (lambda _
315
                    (substitute* "platform/util/src/com/intellij/ui/mac/foundation/Foundation.java"
316
                      (("public static class NSRect extends Structure implements Structure.ByValue.*")
317
                       "public static class NSRect extends Structure implements Structure.ByValue {
318
@Override
319
protected java.util.List<String> getFieldOrder() {
320
  return java.util.Arrays.asList(new String[]{\"origin\", \"size\"});
321
}")
322
                      (("public static class NSPoint extends Structure implements Structure.ByValue.*")
323
                       "public static class NSPoint extends Structure implements Structure.ByValue {
324
@Override
325
protected java.util.List<String> getFieldOrder() {
326
  return java.util.Arrays.asList(new String[]{\"x\", \"y\"});
327
}")
328
                      (("public static class NSSize extends Structure implements Structure.ByValue.*")
329
                       "public static class NSSize extends Structure implements Structure.ByValue {
330
@Override
331
protected java.util.List<String> getFieldOrder() {
332
  return java.util.Arrays.asList(new String[]{\"width\", \"height\"});
333
}"))
334
                    #t))))))))))
335
336
(define-public java-intellij-platform-extensions
337
  (package
338
    (name "java-intellij-platform-extensions")
339
    (version intellij-community-version)
340
    (source intellij-community-source)
341
    (build-system ant-build-system)
342
    (arguments
343
     `(#:source-dir "platform/extensions/src"
344
       #:jar-name "intellij.platform.extensions.jar"
345
       ;; No test
346
       #:tests? #f))
347
    (propagated-inputs
348
     `(("java-intellij-platform-util" ,java-intellij-platform-util)
349
       ("java-jetbrains-annotations" ,java-jetbrains-annotations)
350
       ("java-picocontainer-1" ,java-picocontainer-1)))
351
    (home-page "https://github.com/JetBrains/intellij-community")
352
    (synopsis "")
353
    (description "")
354
    (license license:asl2.0)))
355
356
(define-public java-intellij-platform-core-api
357
  (package
358
    (name "java-intellij-platform-core-api")
359
    (version intellij-community-version)
360
    (source intellij-community-source)
361
    (build-system ant-build-system)
362
    (arguments
363
     `(#:source-dir "platform/core-api/src"
364
       #:jar-name "intellij.platform.core-api.jar"
365
       ;; No test
366
       #:tests? #f))
367
    (propagated-inputs
368
     `(("java-automaton" ,java-automaton)
369
       ("java-intellij-platform-extensions" ,java-intellij-platform-extensions)
370
       ("java-intellij-platform-resources" ,java-intellij-platform-resources)
371
       ("java-intellij-platform-util" ,java-intellij-platform-util)
372
       ("java-intellij-resources" ,java-intellij-resources)
373
       ("java-jetbrains-annotations" ,java-jetbrains-annotations)
374
       ("java-trove4j-intellij" ,java-trove4j-intellij)))
375
    (properties
376
     `((intellij-130-variant . ,(delay java-intellij-platform-core-api-130))))
377
    (home-page "https://github.com/JetBrains/intellij-community")
378
    (synopsis "")
379
    (description "")
380
    (license license:asl2.0)))
381
382
(define-public java-intellij-platform-core-api-130
383
  (let ((base (intellij-130-package
384
                (strip-130-variant java-intellij-platform-core-api))))
385
    (package
386
      (inherit base)
387
      (propagated-inputs
388
       (append (package-propagated-inputs base)
389
               `(("java-asm" ,java-asm)
390
                 ("java-cglib" ,java-cglib)))))))
391
392
(define-public java-intellij-platform-boot
393
  (package
394
    (name "java-intellij-platform-boot")
395
    (version intellij-community-version)
396
    (source intellij-community-source)
397
    (build-system ant-build-system)
398
    (arguments
399
      ;; TODO: remove these auto-generated files and generate them with
400
      ;; java-flex from the same-named file in src, with .flex extension
401
      ;; (_JavaLexer, _JavaDocLexer)
402
     `(#:source-dir "platform/boot/src"
403
       #:jar-name "intellij.platform.boot.jar"
404
       ;; No test
405
       #:tests? #f
406
       #:phases
407
       (modify-phases %standard-phases
408
         (add-before 'build 'copy-resources
409
           (lambda _
410
             (copy-recursively "java/java-psi-impl/src/META-INF"
411
                               "build/classes/META-INF")
412
             #t)))))
413
    (home-page "https://github.com/JetBrains/intellij-community")
414
    (synopsis "")
415
    (description "")
416
    (license license:asl2.0)))
417
418
(define-public java-intellij-platform-core-impl
419
  (package
420
    (name "java-intellij-platform-core-impl")
421
    (version intellij-community-version)
422
    (source intellij-community-source)
423
    (build-system ant-build-system)
424
    (arguments
425
     `(#:source-dir "platform/core-impl/src"
426
       #:jar-name "intellij.platform.core-impl.jar"
427
       ;; No test
428
       #:tests? #f))
429
    (propagated-inputs
430
     `(("java-guava" ,java-guava)
431
       ("java-intellij-platform-boot" ,java-intellij-platform-boot)
432
       ("java-intellij-platform-core-api" ,java-intellij-platform-core-api)))
433
    (properties
434
     `((intellij-130-variant . ,(delay java-intellij-platform-core-impl-130))))
435
    (home-page "https://github.com/JetBrains/intellij-community")
436
    (synopsis "")
437
    (description "")
438
    (license license:asl2.0)))
439
440
(define-public java-intellij-platform-core-impl-130
441
  (let ((base (intellij-130-package
442
                (strip-130-variant java-intellij-platform-core-impl))))
443
    (package
444
      (inherit base)
445
      (propagated-inputs
446
       (append (package-propagated-inputs base)
447
               `(("java-snappy" ,java-snappy)))))))
448
449
(define-public java-intellij-java-psi-api
450
  (package
451
    (name "java-intellij-java-psi-api")
452
    (version intellij-community-version)
453
    (source intellij-community-source)
454
    (build-system ant-build-system)
455
    (arguments
456
     `(#:source-dir "java/java-psi-api/src"
457
       #:jar-name "intellij.java.psi-api.jar"
458
       ;; No test
459
       #:tests? #f
460
       #:phases
461
       (modify-phases %standard-phases
462
         (add-before 'build 'copy-resources
463
           (lambda _
464
             (copy-recursively "java/java-psi-api/src/messages"
465
                               "build/classes/messages")
466
             #t)))))
467
    (propagated-inputs
468
     `(("java-intellij-platform-core-api" ,java-intellij-platform-core-api)
469
       ("java-intellij-platform-util" ,java-intellij-platform-util)
470
       ("java-jetbrains-annotations" ,java-jetbrains-annotations)))
471
    (home-page "https://github.com/JetBrains/intellij-community")
472
    (synopsis "")
473
    (description "")
474
    (license license:asl2.0)))
475
476
(define-public java-intellij-java-psi-impl
477
  (package
478
    (name "java-intellij-java-psi-impl")
479
    (version intellij-community-version)
480
    (source intellij-community-source)
481
    (build-system ant-build-system)
482
    (arguments
483
      ;; TODO: remove these auto-generated files and generate them with
484
      ;; java-flex from the same-named file in src, with .flex extension
485
      ;; (_JavaLexer, _JavaDocLexer)
486
     `(#:source-dir "java/java-psi-impl/src:java/java-psi-impl/gen"
487
       #:jar-name "intellij.java.psi-impl.jar"
488
       ;; No test
489
       #:tests? #f
490
       #:phases
491
       (modify-phases %standard-phases
492
         (add-before 'build 'fix-asm
493
           (lambda _
494
             (with-fluids ((%default-port-encoding "ISO-8859-1"))
495
               (substitute* (find-files "java/java-psi-impl/src" ".*\\.java$")
496
                 (("org.jetbrains.org.objectweb") "org.objectweb")
497
                 ;; As in build/asm/3_api_version.patch
498
                 (("API_VERSION") "ASM6")))
499
             #t))
500
         (add-before 'build 'copy-resources
501
           (lambda _
502
             (copy-recursively "java/java-psi-impl/src/META-INF"
503
                               "build/classes/META-INF")
504
             (copy-recursively "java/java-psi-impl/src/messages"
505
                               "build/classes/intellij/java/resources/en")
506
             #t)))))
507
    (propagated-inputs
508
     `(("java-asm" ,java-asm)
509
       ("java-intellij-java-psi-api" ,java-intellij-java-psi-api)
510
       ("java-intellij-platform-core-impl" ,java-intellij-platform-core-impl)
511
       ("java-jetbrains-annotations" ,java-jetbrains-annotations)
512
       ("java-streamex" ,java-streamex)))
513
    (properties
514
     `((intellij-130-variant . ,(delay java-intellij-java-psi-impl-130))))
515
    (home-page "https://github.com/JetBrains/intellij-community")
516
    (synopsis "")
517
    (description "")
518
    (license license:asl2.0)))
519
520
(define-public java-intellij-java-psi-impl-130
521
  (let ((base (intellij-130-package
522
                (strip-130-variant java-intellij-java-psi-impl))))
523
    (package
524
      (inherit base)
525
      (arguments
526
        (substitute-keyword-arguments (package-arguments base)
527
          ((#:source-dir _)
528
           "java/java-psi-impl/src")
529
          ((#:phases phases)
530
           `(modify-phases ,phases
531
              (add-before 'build 'fix-asm
532
                (lambda _
533
                  (substitute* "java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsParsingUtil.java"
534
                    (("V1_9") "V9"))
535
                  #t)))))))))
536
537
(define-public java-intellij-platform-resources
538
  (package
539
    (name "java-intellij-platform-resources")
540
    (version intellij-community-version)
541
    (source intellij-community-source)
542
    (build-system ant-build-system)
543
    (arguments
544
      ;; TODO: remove these auto-generated files and generate them with
545
      ;; java-flex from the same-named file in src, with .flex extension
546
      ;; (_JavaLexer, _JavaDocLexer)
547
     `(#:source-dir "platform/platform-resources"
548
       #:jar-name "intellij.platform.resources.jar"
549
       ;; No test
550
       #:tests? #f
551
       #:phases
552
       (modify-phases %standard-phases
553
         (add-before 'build 'copy-resources
554
           (lambda _
555
             (copy-recursively "platform/platform-resources/src"
556
                               "build/classes")
557
             #t)))))
558
    (propagated-inputs '())
559
    (native-inputs '())
560
    (inputs '())
561
    (home-page "https://github.com/JetBrains/intellij-community")
562
    (synopsis "")
563
    (description "")
564
    (license license:asl2.0)))
565
566
(define-public java-intellij-resources
567
  (package
568
    (name "java-intellij-resources")
569
    (version intellij-community-version)
570
    (source intellij-community-source)
571
    (build-system ant-build-system)
572
    (arguments
573
      ;; TODO: remove these auto-generated files and generate them with
574
      ;; java-flex from the same-named file in src, with .flex extension
575
      ;; (_JavaLexer, _JavaDocLexer)
576
     `(#:source-dir "resources"
577
       #:jar-name "intellij.resources.jar"
578
       ;; No test
579
       #:tests? #f
580
       #:phases
581
       (modify-phases %standard-phases
582
         (add-before 'build 'copy-resources
583
           (lambda _
584
             (copy-recursively "resources/src" "build/classes")
585
             #t)))))
586
    (propagated-inputs '())
587
    (native-inputs '())
588
    (inputs '())
589
    (home-page "https://github.com/JetBrains/intellij-community")
590
    (synopsis "")
591
    (description "")
592
    (license license:asl2.0)))
593
594
;; Newer versions are not free software anymore
595
;; latest free versions are 1.8.1 and 1.8.0. We require something older for
596
;; intellij though.
597
(define-public java-jgoodies-common
598
  (package
599
    (name "java-jgoodies-common")
600
    (version "1.8.1")
601
    (source (origin
602
              (method url-fetch)
603
              (uri "http://www.jgoodies.com/download/libraries/common/jgoodies-common-1_8_1.zip")
604
              (sha256
605
               (base32
606
                "1canj4zalrp668c55ji58rk90w005q44lnwzliffsr8mlrgxgaiw"))))
607
    (build-system ant-build-system)
608
    (arguments
609
     `(#:jar-name "jgoodies-common.jar"
610
       #:source-dir "."
611
       #:tests? #f; no tests
612
       #:phases
613
       (modify-phases %standard-phases
614
         (add-before 'build 'extract-source
615
           (lambda _
616
             (invoke "jar" "xf" "jgoodies-common-1.8.1-sources.jar")
617
             #t)))))
618
    (native-inputs
619
     `(("unzip" ,unzip)))
620
    (home-page "http://www.jgoodies.com")
621
    (synopsis "")
622
    (description "")
623
    (license license:bsd-3)))
624
625
(define-public java-jgoodies-forms
626
  (package
627
    (name "java-jgoodies-forms")
628
    (version "1.8.0")
629
    (source (origin
630
              (method url-fetch)
631
              (uri "http://www.jgoodies.com/download/libraries/forms/jgoodies-forms-1_8_0.zip")
632
              (sha256
633
               (base32
634
                "1av4w1px1jxmv19mljyicbv657sw5nqhkfx6s7nc5ckzf9ay945h"))))
635
    (build-system ant-build-system)
636
    (arguments
637
     `(#:jar-name "jgoodies-forms.jar"
638
       #:source-dir "."
639
       #:tests? #f; no tests
640
       #:phases
641
       (modify-phases %standard-phases
642
         (add-before 'build 'extract-source
643
           (lambda _
644
             (invoke "jar" "xf" "jgoodies-forms-1.8.0-sources.jar")
645
             #t)))))
646
    (native-inputs
647
     `(("unzip" ,unzip)))
648
    (inputs
649
     `(("java-jgoodies-common" ,java-jgoodies-common)))
650
    (home-page "http://www.jgoodies.com")
651
    (synopsis "")
652
    (description "")
653
    (license license:bsd-3)))
654
655
;; Requires JGoodies Forms: http://www.jgoodies.com
656
(define-public java-intellij-compiler-forms-compiler
657
  (package
658
    (name "java-intellij-compiler-forms-compiler")
659
    (version intellij-community-version)
660
    (source intellij-community-source)
661
    (build-system ant-build-system)
662
    (arguments
663
     `(#:source-dir "java/compiler/forms-compiler/src"
664
       #:jar-name "forms-compiler.jar"
665
       ;; No test
666
       #:tests? #f
667
       #:phases
668
       (modify-phases %standard-phases
669
         (add-before 'build 'fix-imports
670
           (lambda _
671
             (substitute* (find-files "java/compiler/forms-compiler/src" ".*.java")
672
               (("org.jetbrains.org.objectweb") "org.objectweb")
673
                ;; As in build/asm/3_api_version.patch
674
               (("API_VERSION") "ASM6"))))
675
         (add-before 'build 'fix-old-jgoodies
676
           (lambda _
677
             (substitute* "java/compiler/forms-compiler/src/com/intellij/uiDesigner/lw/FormLayoutSerializer.java"
678
               (("new ColumnSpec\\(spec\\)") "ColumnSpec.parse(spec)")))))))
679
    (inputs
680
     `(("java-intellij-platform-forms-rt" ,java-intellij-platform-forms-rt)
681
       ("java-intellij-compiler-instrumentation-util" ,java-intellij-compiler-instrumentation-util)
682
       ("java-asm" ,java-asm)
683
       ("java-jdom" ,java-jdom)
684
       ("java-jgoodies-forms" ,java-jgoodies-forms)))
685
    (home-page "https://github.com/JetBrains/intellij-community")
686
    (synopsis "")
687
    (description "")
688
    (license license:asl2.0)))
689