Use older intellij for kotlin@0, still not working

Julien LepillerSun May 19 20:49:52+0200 2019

a9893ac

Use older intellij for kotlin@0, still not working

more/packages/intellij.scm

4343
  #:use-module (gnu packages xml)
4444
  #:use-module (more packages java))
4545
46-
(define intellij-community-2013-commit "8bc091c3131a888b5400c63a9e51eb0bc7fbe0fb")
46+
;(define intellij-community-2013-commit "8bc091c3131a888b5400c63a9e51eb0bc7fbe0fb")
47+
;; Take a random old commit that has the right files
48+
(define intellij-community-2013-commit "f116b27261f9dea1c0f00b90ad09d58c6e2fa2f2")
4749
(define intellij-community-2013-version (git-version "0.0.0" "0"
4850
                                                     intellij-community-2013-commit))
4951

7577
                                    intellij-community-commit
7678
                                    intellij-community-version
7779
                                    "17qzhh2kw6sxwkyj7ng7hrpbcf2rjs2xjbsrg1bgkg90r5kb8sm4"))
80+
;(define intellij-community-2013-source (get-intellij-community-source
81+
;                                        intellij-community-2013-commit
82+
;                                        intellij-community-2013-version
83+
;                                        "0z5rq713lf7q2x0c0sb0r1ha2pszcyygddh7r12wyzf5p0iiy1im"))
7884
(define intellij-community-2013-source (get-intellij-community-source
7985
                                        intellij-community-2013-commit
8086
                                        intellij-community-2013-version
81-
                                        "0z5rq713lf7q2x0c0sb0r1ha2pszcyygddh7r12wyzf5p0iiy1im"))
87+
                                        "095xj9kyg5x6gzqpswgv48zqzwcy5ijfkmmifshffkilq0m0sqng"))
8288
8389
(define (strip-intellij-variant variant-property base)
8490
  (package

167173
    (native-inputs
168174
     `(("unzip" ,unzip)))))
169175
176+
(define-public java-jsr166e-for-intellij-2013
177+
  (package
178+
    (name "java-jsr166e")
179+
    (version "0")
180+
    (source (origin
181+
              (method url-fetch)
182+
              (uri (string-append "https://github.com/JetBrains/"
183+
                                  "intellij-community/raw/"
184+
                                  intellij-community-2013-commit
185+
                                  "/lib/src/jsr166e_src.jar"))
186+
              (sha256
187+
               (base32
188+
                "0ifiszqz57c1i90fhhprfll5jribh7s4wq1qnmkl9454pcdawrzp"))))
189+
    (build-system ant-build-system)
190+
    (arguments
191+
     `(#:jar-name "jsr166e.jar"
192+
       #:source-dir ".."
193+
       #:jdk ,icedtea-7
194+
       #:tests? #f))
195+
    (home-page "")
196+
    (synopsis "")
197+
    (description "")
198+
    (license license:cc0)))
199+
170200
(define-public java-intellij-compiler-javac2
171201
  (package
172202
    (name "java-intellij-compiler-javac2")

272302
       (append (alist-delete "java-jdom-for-intellij" (package-propagated-inputs base))
273303
               `(("java-batik-1.7" ,java-batik-1.7)
274304
                 ("java-iq80-snappy" ,java-iq80-snappy)
275-
                 ("java-jdom" ,java-jdom-for-intellij-2013))))
305+
                 ("java-jdom" ,java-jdom-for-intellij-2013)
306+
                 ("java-jsr166e-for-intellij-2013" ,java-jsr166e-for-intellij-2013)
307+
                 ("java-picocontainer-1" ,java-picocontainer-1))))
276308
      (inputs
277309
       `(("java-eawtstub" ,java-eawtstub)))
278310
      (arguments
279311
        (substitute-keyword-arguments (package-arguments base)
280312
          ((#:phases phases)
281313
           `(modify-phases ,phases
282-
              (delete 'remove-apple))))))))
314+
              (delete 'remove-apple)
315+
              (add-before 'build 'fix-newer-jdk
316+
                (lambda _
317+
                  (substitute* "platform/util/src/com/intellij/ui/mac/foundation/Foundation.java"
318+
                    (("public static class NSRect extends Structure implements Structure.ByValue.*")
319+
                     "public static class NSRect extends Structure implements Structure.ByValue {
320+
@Override
321+
protected java.util.List<String> getFieldOrder() {
322+
  return java.util.Arrays.asList(new String[]{\"origin\", \"size\"});
323+
}")
324+
                    (("public static class NSPoint extends Structure implements Structure.ByValue.*")
325+
                     "public static class NSPoint extends Structure implements Structure.ByValue {
326+
@Override
327+
protected java.util.List<String> getFieldOrder() {
328+
  return java.util.Arrays.asList(new String[]{\"x\", \"y\"});
329+
}")
330+
                    (("public static class NSSize extends Structure implements Structure.ByValue.*")
331+
                     "public static class NSSize extends Structure implements Structure.ByValue {
332+
@Override
333+
protected java.util.List<String> getFieldOrder() {
334+
  return java.util.Arrays.asList(new String[]{\"width\", \"height\"});
335+
}"))
336+
                  #t)))))))))
283337
284338
(define-public java-intellij-platform-extensions
285339
  (package

334388
      (inherit base)
335389
      (propagated-inputs
336390
       (append (package-propagated-inputs base)
337-
               `(("java-cglib" ,java-cglib))))
391+
               `(("java-asm" ,java-asm)
392+
                 ("java-cglib" ,java-cglib))))
338393
      (arguments
339394
       (append
340395
         (package-arguments base)

346401
                 (delete-file-recursively "platform/core-api/src/net")
347402
                 #t)))))))))
348403
404+
(define-public java-intellij-platform-boot
405+
  (package
406+
    (name "java-intellij-platform-boot")
407+
    (version intellij-community-version)
408+
    (source intellij-community-source)
409+
    (build-system ant-build-system)
410+
    (arguments
411+
      ;; TODO: remove these auto-generated files and generate them with
412+
      ;; java-flex from the same-named file in src, with .flex extension
413+
      ;; (_JavaLexer, _JavaDocLexer)
414+
     `(#:source-dir "platform/boot/src"
415+
       #:jar-name "intellij.platform.boot.jar"
416+
       ;; No test
417+
       #:tests? #f
418+
       #:phases
419+
       (modify-phases %standard-phases
420+
         (add-before 'build 'copy-resources
421+
           (lambda _
422+
             (copy-recursively "java/java-psi-impl/src/META-INF"
423+
                               "build/classes/META-INF")
424+
             #t)))))
425+
    (home-page "https://github.com/JetBrains/intellij-community")
426+
    (synopsis "")
427+
    (description "")
428+
    (license license:asl2.0)))
429+
349430
(define-public java-intellij-platform-core-impl
350431
  (package
351432
    (name "java-intellij-platform-core-impl")

359440
       #:tests? #f))
360441
    (propagated-inputs
361442
     `(("java-guava" ,java-guava)
443+
       ("java-intellij-platform-boot" ,java-intellij-platform-boot)
362444
       ("java-intellij-platform-core-api" ,java-intellij-platform-core-api)))
363445
    (home-page "https://github.com/JetBrains/intellij-community")
364446
    (synopsis "")

more/packages/kotlin.scm

7171
(define-public kotlin-0
7272
  (package
7373
    (name "kotlin")
74-
    (version "0")
74+
    (version "0.4.424")
7575
    (source (origin
7676
              (method git-fetch)
7777
              (uri (git-reference

8282
              (sha256
8383
               (base32
8484
                "0f60v3swyrkh41c4lhha64njivvsnr7p6yz7i1vjmvs697pjvqg2"))
85-
              (patches
86-
                (search-patches "kotlin-Update-for-dependencies.patch"))
85+
              ;(patches
86+
              ;  (search-patches "kotlin-Update-for-dependencies.patch"))
8787
              (modules '((guix build utils)))
8888
              (snippet
8989
                `(begin

9898
    (build-system ant-build-system)
9999
    (arguments
100100
     `(#:build-target "dist"
101-
       #:make-flags (list "-Dshrink=false")
102101
       #:phases
103102
       (modify-phases %standard-phases
104103
         (add-before 'build 'copy-jars