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