gnu: shflags: Update to 1.2.3.
[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>
842a1400
TF
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 (gnu packages uml)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix utils)
24 #:use-module (guix build-system ant)
25 #:use-module (gnu packages graphviz)
26 #:use-module (gnu packages java))
27
28(define-public plantuml
29 (package
30 (name "plantuml")
31 (version "8048")
32 (source (origin
33 (method url-fetch)
34 (uri (string-append
35 "mirror://sourceforge/plantuml/plantuml-"
36 version ".tar.gz"))
37 (sha256
38 (base32
39 "1vipxd6p7isb1k1qqh4hrpfcj27hx1nll2yp0rfwpvps1w2d936i"))))
40 (build-system ant-build-system)
41 (arguments
42 `(#:tests? #f ; no tests
43 #:build-target "dist"
44 #:phases
45 (modify-phases %standard-phases
46 (add-before 'build 'delete-extra-from-classpath
47 (lambda _
48 (substitute* "build.xml"
49 (("1.6") "1.7")
50 (("<attribute name=\"Class-Path\"") "<!--")
51 (("j2v8_macosx_x86_64-3.1.7.jar\" />") "-->"))
52 #t))
53 (add-after 'delete-extra-from-classpath 'patch-usr-bin-dot
54 (lambda* (#:key inputs #:allow-other-keys)
55 (let ((dot (string-append (assoc-ref inputs "graphviz")
56 "/bin/dot")))
57 (substitute*
58 "src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java"
59 (("/usr/bin/dot") dot)))
60 #t))
61 (replace 'install
62 (lambda* (#:key outputs #:allow-other-keys)
63 (install-file "plantuml.jar" (string-append
64 (assoc-ref outputs "out")
65 "/share/java"))
66 #t))
67 (add-after 'install 'make-wrapper
68 (lambda* (#:key inputs outputs #:allow-other-keys)
69 (let* ((out (assoc-ref outputs "out"))
70 (wrapper (string-append out "/bin/plantuml")))
71 (mkdir-p (string-append out "/bin"))
72 (with-output-to-file wrapper
73 (lambda _
74 (display
75 (string-append
76 "#!/bin/sh\n\n"
77 (assoc-ref inputs "jre") "/bin/java -jar "
78 out "/share/java/plantuml.jar \"$@\"\n"))))
79 (chmod wrapper #o555))
80 #t)))))
81 (inputs
82 `(("graphviz" ,graphviz)
83 ("jre" ,icedtea)))
84 (home-page "http://plantuml.com/")
85 (synopsis "Draw UML diagrams from simple textual description")
86 (description
87 "Plantuml is a tool to generate sequence, usecase, class, activity,
88component, state, deployment and object UML diagrams, using a simple and
89human readable text description. Contains @code{salt}, a tool that can design
90simple graphical interfaces.")
91 (license license:gpl3+)))