~whereiseveryone/guixrus

guixrus/guixrus/packages/java.scm -rw-r--r-- 3.8 KiB
beb74e80(unmatched-parenthesis [urgent fix] turns out patch location doesn't work out of the box in non-`guix` channels... 8 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
;;; GNU Guix --- Functional package management for GNU
;;; Copyright   2021 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages java)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system ant)
  #:use-module (gnu packages)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-26)
  #:use-module (ice-9 match))

(define-public java-jvnet-parent-pom
  (hidden-package
    (package
      (name "java-jvnet-parent-pom")
      (version "5")
      (source (origin
                (method url-fetch)
                (uri (string-append "https://repo1.maven.org/maven2/net/java/"
                                    "jvnet-parent/" version "/jvnet-parent-"
                                    version ".pom"))
                (sha256
                 (base32
                  "02nbr5jk9ynaaky5zzbdb8m3dc2yj7bzn0njl3wngayxv7w9kxhs"))))
      (build-system ant-build-system)
      (arguments
       (list
         #:tests? #f
         #:phases
         #~(modify-phases %standard-phases
             (delete 'unpack)
             (delete 'configure)
             (delete 'build)
             (replace 'install
               (install-pom-file #$(package-source this-package))))))
      (home-page "https://mvnrepository.com/artifact/net.java/jvnet-parent")
      (synopsis "Java.net parent pom")
      (description "This package contains the Java.net parent pom file.")
      (license license:asl2.0))))

(define-public java-javax-websocket-api-client
  (package
    (name "java-javax-websocket-api-client")
    (version "1.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/javaee/websocket-spec")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0akvr078amiy1rypcjfxbr0gfj2q0qiyb7fc7xhiq4ajiy58d13k"))))
    (build-system ant-build-system)
    (arguments
     `(#:tests? #f; no tests
       #:jar-name ,(string-append name ".jar")
       #:source-dir "api/client/src/main/java"
       #:phases
       (modify-phases %standard-phases
         (replace 'install (install-from-pom "api/client/pom.xml"))
	 (add-after 'install 'install-parent (install-pom-file "api/pom.xml")))))
    (propagated-inputs (list java-jvnet-parent-pom))
    (home-page "https://github.com/javaee/websocket-spec")
    (synopsis
     "Websocket in Java")
    (description
     "This package defines a set of Java APIs for the development of websocket
applications.")
    (license license:cddl1.1)))

(define-public java-javax-websocket-api-server
  (package
    (inherit java-javax-websocket-api-client)
    (name "java-javax-websocket-api-server")
    (arguments
     `(#:tests? #f; no tests
       #:jar-name ,(string-append name ".jar")
       #:source-dir "api/server/src/main/java"
       #:phases
       (modify-phases %standard-phases
         (replace 'install (install-from-pom "api/server/pom.xml")))))
    (propagated-inputs (list java-javax-websocket-api-client))))