kotlin.scm
| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018, 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 kotlin) |
| 20 | #:use-module ((guix licenses) #:prefix license:) |
| 21 | #:use-module (gnu packages) |
| 22 | #:use-module (guix packages) |
| 23 | #:use-module (guix download) |
| 24 | #:use-module (guix git-download) |
| 25 | #:use-module (guix svn-download) |
| 26 | #:use-module (guix cvs-download) |
| 27 | #:use-module (guix utils) |
| 28 | #:use-module (guix build-system ant) |
| 29 | #:use-module (guix build-system gnu) |
| 30 | #:use-module (guix build-system trivial) |
| 31 | #:use-module (gnu packages autotools) |
| 32 | #:use-module (gnu packages base) |
| 33 | #:use-module (gnu packages batik) |
| 34 | #:use-module (gnu packages compression) |
| 35 | #:use-module (gnu packages docbook) |
| 36 | #:use-module (gnu packages java) |
| 37 | #:use-module (gnu packages maven) |
| 38 | #:use-module (gnu packages perl) |
| 39 | #:use-module (gnu packages web) |
| 40 | #:use-module (gnu packages xml) |
| 41 | #:use-module (more packages intellij) |
| 42 | #:use-module (more packages java)) |
| 43 | |
| 44 | (define-public kotlin-0 |
| 45 | (package |
| 46 | (name "kotlin") |
| 47 | (version "0") |
| 48 | (source (origin |
| 49 | (method git-fetch) |
| 50 | (uri (git-reference |
| 51 | (url "https://github.com/JetBrains/kotlin") |
| 52 | (commit "2f47e30a1a12347759dbb8707f5137178de65696"))) |
| 53 | (file-name (git-file-name name version)) |
| 54 | (sha256 |
| 55 | (base32 |
| 56 | "0f60v3swyrkh41c4lhha64njivvsnr7p6yz7i1vjmvs697pjvqg2")) |
| 57 | (modules '((guix build utils))) |
| 58 | (snippet |
| 59 | `(begin |
| 60 | (for-each delete-file (find-files "." ".*.jar$")) |
| 61 | (mkdir "ideaSDK") |
| 62 | (mkdir "dependencies") |
| 63 | #t)))) |
| 64 | (build-system ant-build-system) |
| 65 | (arguments |
| 66 | `(#:build-target "dist" |
| 67 | #:phases |
| 68 | (modify-phases %standard-phases |
| 69 | (add-before 'build 'copy-jars |
| 70 | (lambda* (#:key inputs #:allow-other-keys) |
| 71 | (for-each |
| 72 | (lambda (file) |
| 73 | (copy-file file (string-append "lib/" (basename file)))) |
| 74 | (apply append |
| 75 | (map (lambda (input) |
| 76 | (find-files (assoc-ref inputs input) ".*.jar$")) |
| 77 | '("java-asm" "java-asm-commons" |
| 78 | "java-guava" |
| 79 | "java-intellij-java-psi-api" |
| 80 | "java-intellij-platform-core-api" |
| 81 | "java-intellij-platform-core-impl" |
| 82 | "java-intellij-platform-util" |
| 83 | "java-javax-inject" |
| 84 | "java-jsr305" |
| 85 | "java-jetbrains-annotations")))) |
| 86 | #t)) |
| 87 | (add-before 'build 'fix-asm |
| 88 | (lambda _ |
| 89 | (substitute* (find-files "." ".*.java$") |
| 90 | (("org.jetbrains.asm4") "org.objectweb.asm")) |
| 91 | #t))))) |
| 92 | (inputs |
| 93 | `(("java-asm" ,java-asm) |
| 94 | ("java-asm-commons" ,java-asm-commons-7) |
| 95 | ("java-intellij-java-psi-api" ,java-intellij-java-psi-api) |
| 96 | ("java-intellij-platform-core-api" ,java-intellij-platform-core-api) |
| 97 | ("java-intellij-platform-core-impl" ,java-intellij-platform-core-impl) |
| 98 | ("java-intellij-platform-util" ,java-intellij-platform-util) |
| 99 | ("java-javax-inject" ,java-javax-inject) |
| 100 | ("java-jsr305" ,java-jsr305) |
| 101 | ("java-jetbrains-annotations" ,java-jetbrains-annotations) |
| 102 | ("java-guava" ,java-guava))) |
| 103 | (home-page "") |
| 104 | (synopsis "") |
| 105 | (description "") |
| 106 | (license license:asl2.0))) |
| 107 | |
| 108 | ;; Needs maven-core |
| 109 | (define-public kotlin-1.2 |
| 110 | (package |
| 111 | (name "kotlin") |
| 112 | ;; last version with a build.xml file |
| 113 | ;; TODO: check if version 1.2.32-1.2.39 exist. 1.2.40 doesn't have build.xml. |
| 114 | (version "1.2.31") |
| 115 | (source (origin |
| 116 | (method url-fetch) |
| 117 | (uri (string-append "https://github.com/JetBrains/kotlin/archive/v" |
| 118 | version ".tar.gz")) |
| 119 | (file-name (string-append name "-" version ".tar.gz")) |
| 120 | (sha256 |
| 121 | (base32 |
| 122 | "1lm1rvj1vf4z8nzpffqcdwcydnlf24ls07z0r0nc4by3hjxzs3sv")) |
| 123 | (modules '((guix build utils))) |
| 124 | (snippet |
| 125 | `(begin |
| 126 | (for-each delete-file (find-files "." ".*.jar$")) |
| 127 | #t)))) |
| 128 | (build-system ant-build-system) |
| 129 | (arguments |
| 130 | `(#:phases |
| 131 | (modify-phases %standard-phases |
| 132 | (add-before 'build 'fix-build.xml |
| 133 | (lambda _ |
| 134 | (substitute* "build.xml" |
| 135 | (("org/jetbrains/kotlin/ant/antlib.xml") |
| 136 | "ant/src/org/jetbrains/kotlin/ant/antlib.xml"))))))) |
| 137 | (native-inputs |
| 138 | `(("java-intellij-compiler-javac2" ,java-intellij-compiler-javac2))) |
| 139 | (home-page "https://kotlinlang.org/") |
| 140 | (synopsis "Programming language targetting the JVM") |
| 141 | (description "") |
| 142 | (license license:asl2.0))) |
| 143 | |
| 144 | (define-public kotlin |
| 145 | (package |
| 146 | (name "kotlin") |
| 147 | (version "1.3.11") |
| 148 | (source (origin |
| 149 | (method git-fetch) |
| 150 | (uri (git-reference |
| 151 | (url "https://github.com/JetBrains/kotlin") |
| 152 | (commit (string-append "v" version)))) |
| 153 | (file-name (git-file-name name version)) |
| 154 | (sha256 |
| 155 | (base32 |
| 156 | "123gfr72p0715n925kivl3khlqzk11qpyv65jwlhcplgfvw8rl73")))) |
| 157 | (build-system ant-build-system) |
| 158 | (home-page "https://kotlinlang.org/") |
| 159 | (synopsis "Programming language targetting the JVM") |
| 160 | (description "") |
| 161 | (license license:asl2.0))) |
| 162 |