gnu: deutex: Update to 5.2.1.
[jackhill/guix/guix.git] / gnu / packages / uml.scm
CommitLineData
842a1400 1;;; GNU Guix --- Functional package management for GNU
d109b1e8 2;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
722ac64c 3;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
84bdd0ec 4;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
842a1400
TF
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages uml)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix utils)
26 #:use-module (guix build-system ant)
27 #:use-module (gnu packages graphviz)
28 #:use-module (gnu packages java))
29
30(define-public plantuml
31 (package
32 (name "plantuml")
e6b244a5 33 (version "1.2019.3")
842a1400
TF
34 (source (origin
35 (method url-fetch)
722ac64c
AI
36 (uri (string-append "mirror://sourceforge/plantuml/"
37 version "/plantuml-" version ".tar.gz"))
842a1400
TF
38 (sha256
39 (base32
e6b244a5 40 "0p2mqav0qfc6kmkhb2n1vjysffnvpsx4yal68nl0yrh5vd3bnmza"))))
842a1400
TF
41 (build-system ant-build-system)
42 (arguments
84bdd0ec 43 `(#:tests? #f ; no tests
842a1400
TF
44 #:build-target "dist"
45 #:phases
46 (modify-phases %standard-phases
47 (add-before 'build 'delete-extra-from-classpath
48 (lambda _
49 (substitute* "build.xml"
50 (("1.6") "1.7")
51 (("<attribute name=\"Class-Path\"") "<!--")
52 (("j2v8_macosx_x86_64-3.1.7.jar\" />") "-->"))
53 #t))
54 (add-after 'delete-extra-from-classpath 'patch-usr-bin-dot
55 (lambda* (#:key inputs #:allow-other-keys)
56 (let ((dot (string-append (assoc-ref inputs "graphviz")
57 "/bin/dot")))
58 (substitute*
59 "src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java"
60 (("/usr/bin/dot") dot)))
61 #t))
62 (replace 'install
63 (lambda* (#:key outputs #:allow-other-keys)
64 (install-file "plantuml.jar" (string-append
65 (assoc-ref outputs "out")
66 "/share/java"))
67 #t))
68 (add-after 'install 'make-wrapper
69 (lambda* (#:key inputs outputs #:allow-other-keys)
70 (let* ((out (assoc-ref outputs "out"))
71 (wrapper (string-append out "/bin/plantuml")))
72 (mkdir-p (string-append out "/bin"))
73 (with-output-to-file wrapper
74 (lambda _
75 (display
76 (string-append
77 "#!/bin/sh\n\n"
78 (assoc-ref inputs "jre") "/bin/java -jar "
79 out "/share/java/plantuml.jar \"$@\"\n"))))
80 (chmod wrapper #o555))
81 #t)))))
82 (inputs
83 `(("graphviz" ,graphviz)
84 ("jre" ,icedtea)))
85 (home-page "http://plantuml.com/")
86 (synopsis "Draw UML diagrams from simple textual description")
87 (description
88 "Plantuml is a tool to generate sequence, usecase, class, activity,
89component, state, deployment and object UML diagrams, using a simple and
90human readable text description. Contains @code{salt}, a tool that can design
91simple graphical interfaces.")
92 (license license:gpl3+)))