1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
3 ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
4 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
30 (define-public plantuml
36 (uri (string-append "mirror://sourceforge/plantuml/"
37 version "/plantuml-" version ".tar.gz"))
40 "0p2mqav0qfc6kmkhb2n1vjysffnvpsx4yal68nl0yrh5vd3bnmza"))))
41 (build-system ant-build-system)
43 `(#:tests? #f ; no tests
46 (modify-phases %standard-phases
47 (add-before 'build 'delete-extra-from-classpath
49 (substitute* "build.xml"
51 (("<attribute name=\"Class-Path\"") "<!--")
52 (("j2v8_macosx_x86_64-3.1.7.jar\" />") "-->"))
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")
59 "src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java"
60 (("/usr/bin/dot") dot)))
63 (lambda* (#:key outputs #:allow-other-keys)
64 (install-file "plantuml.jar" (string-append
65 (assoc-ref outputs "out")
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
78 (assoc-ref inputs "jre") "/bin/java -jar "
79 out "/share/java/plantuml.jar \"$@\"\n"))))
80 (chmod wrapper #o555))
83 `(("graphviz" ,graphviz)
85 (home-page "http://plantuml.com/")
86 (synopsis "Draw UML diagrams from simple textual description")
88 "Plantuml is a tool to generate sequence, usecase, class, activity,
89 component, state, deployment and object UML diagrams, using a simple and
90 human readable text description. Contains @code{salt}, a tool that can design
91 simple graphical interfaces.")
92 (license license:gpl3+)))