aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2022, 2024 jgart <jgart@dismail.de>
;;;
;;; 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 (gnu packages uml)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (guix build-system ant)
  #:use-module (gnu packages graphviz)
  #:use-module (gnu packages java))

(define-public plantuml
  (package
    (name "plantuml")
    (version "1.2024.6")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/plantuml/plantuml/")
                    (commit (string-append "v" version))))
              (sha256
               (base32
                "0h6hk34x5qc8cyqlw90wnakji8w6n9bykpr3dygvfwg2kvw5rhlv"))))
    (build-system ant-build-system)
    (arguments
     `(#:tests? #f                      ; no tests
       #:build-target "dist"
       #:phases
       (modify-phases %standard-phases
         (add-before 'build 'delete-extra-from-classpath
           (lambda _
             (substitute* "build.xml"
               (("1.6") "1.7")
               (("<attribute name=\"Class-Path\"") "<!--")
               (("ditaa0_9.jar\" />") "-->"))
             #t))
         (add-after 'delete-extra-from-classpath 'patch-usr-bin-dot
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((dot (search-input-file inputs "/bin/dot")))
               (substitute*
                   "src/net/sourceforge/plantuml/dot/GraphvizLinux.java"
                 (("/usr/bin/dot") dot)))
             #t))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (install-file "plantuml.jar" (string-append
                                           (assoc-ref outputs "out")
                                           "/share/java"))
             #t))
         (add-after 'install 'make-wrapper
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (wrapper (string-append out "/bin/plantuml")))
               (mkdir-p (string-append out "/bin"))
               (with-output-to-file wrapper
                 (lambda _
                   (display
                    (string-append
                     "#!/bin/sh\n\n"
                     (assoc-ref inputs "jre") "/bin/java -jar "
                     out "/share/java/plantuml.jar \"$@\"\n"))))
               (chmod wrapper #o555))
             #t)))))
    (inputs
     `(("graphviz" ,graphviz)
       ("jre" ,icedtea)))
    (home-page "https://plantuml.com/")
    (synopsis "Draw UML diagrams from simple textual description")
    (description
     "Plantuml is a tool to generate sequence, usecase, class, activity,
component, state, deployment and object UML diagrams, using a simple and
human readable text description.  Contains @code{salt}, a tool that can design
simple graphical interfaces.")
    (license license:gpl3+)))
t-container.sh: Test it. 2019-03-26environment: Use (gnu build accounts) for /etc/passwd handling.Ludovic Courtès * guix/scripts/environment.scm (launch-environment/container): Remove call to 'mock-passwd'; instantiate a <password-entry> instead. Call 'write-passwd' to write the pasword database instead of using custom code. (mock-passwd): Remove. * tests/guix-environment-container.sh: Test 'getpwuid'. 2019-03-25accounts: Add default value for the 'home-directory' field of <user-account>.Ludovic Courtès * gnu/system/accounts.scm (<user-account>)[home-directory]: Mark as thunked and add a default value. (default-home-directory): New procedure. * doc/guix.texi (User Accounts): Remove 'home-directory' from example. * gnu/system/examples/bare-bones.tmpl: Likewise. * gnu/system/examples/beaglebone-black.tmpl: Likewise. * gnu/system/examples/desktop.tmpl: Likewise. * gnu/system/examples/docker-image.tmpl: Likewise. * gnu/system/examples/lightweight-desktop.tmpl: Likewise. * gnu/system/install.scm (installation-os): Likewise. * gnu/tests.scm (%simple-os): Likewise. * gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda): (%separate-home-os, %encrypted-root-os, %btrfs-root-os): Likewise. * tests/accounts.scm ("allocate-passwd") ("allocate-passwd with previous state"): Likewise. 2019-03-25records: Allow thunked fields to refer to 'this-record'.Ludovic Courtès * guix/records.scm (this-record): New syntax parameter. (make-syntactic-constructor)[wrap-field-value]: When F is thunked, return a one-argument lambda instead of a thunk, and parameterize THIS-RECORD. (define-record-type*)[thunked-field-accessor-definition]: Pass X to (real-get X). * tests/records.scm ("define-record-type* & thunked & this-record") ("define-record-type* & thunked & default & this-record") ("define-record-type* & thunked & inherit & this-record"): New tests. 2019-03-24tests: Adjust 'guix pack -f squashfs' test.Ludovic Courtès This is a followup to 427c87d0bdc06cc3ee7fc220fd3ad36084412533. * tests/pack.scm ("squashfs-image + localstatedir"): Expect "bin" to be a relative symlink. 2019-03-24tests: Add missing import.Ludovic Courtès This is a followup to 22f95e028f038cee342f455dfc55bd32b804907c. * tests/scripts.scm: Use (guix tests). 2019-03-23graph: Add the 'reverse-bag' graph.Ludovic Courtès Suggested by Julien Lepiller. * guix/scripts/graph.scm (%reverse-bag-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("reverse bag DAG"): New test. * doc/guix.texi (Invoking guix graph): Document it. 2019-03-17guix build: '--with-commit' makes recursive checkouts.Ludovic Courtès This was an omission from commit 024a6bfba906742c136a47b4099f06880f1d3f15. * guix/scripts/build.scm (transform-package-source-commit): Add 'recursive?' field to SOURCE. * tests/scripts-build.scm ("options->transformation, with-branch") ("options->transformation, with-commit"): New tests. 2019-03-17guix build: Transformation options match packages by spec.Ludovic Courtès This allows us to combine several transformations on a given package, in particular '--with-git-url' and '--with-branch'. Previously transformations would ignore each other since they would all take (specification->package SOURCE) as their replacement source, compare it by identity, which doesn't work if a previous transformation has already changed SOURCE. * guix/scripts/build.scm (evaluate-replacement-specs): Adjust to produce an alist as expected by 'package-input-rewriting/spec', with a package spec as the first element of each pair. (evaluate-git-replacement-specs): Likewise. (transform-package-inputs): Adjust accordingly and use 'package-input-rewriting/spec'. (transform-package-inputs/graft): Likewise. (transform-package-source-branch, transform-package-source-commit): Use 'package-input-rewriting/spec'. (transform-package-source-git-url): Likewise, and adjust the REPLACEMENTS alist accordingly. (options->transformation): Iterate over OPTS instead of over %TRANSFORMATIONS. Invoke transformations one by one. * tests/scripts-build.scm ("options->transformation, with-input"): Adjust test to compare packages by name rather than by identity. ("options->transformation, with-git-url + with-branch"): New test. 2019-03-17packages: Add 'package-input-rewriting/spec'.Ludovic Courtès * guix/packages.scm (package-input-rewriting/spec): New procedure. * tests/packages.scm ("package-input-rewriting/spec") ("package-input-rewriting/spec, partial match"): New tests. * doc/guix.texi (Defining Packages): Document it. 2019-03-17guix build: Add '--with-git-url'.Ludovic Courtès * guix/scripts/build.scm (%not-equal): New variable. (evaluate-git-replacement-specs): Use it instead of local variable 'not-equal'. (transform-package-source-git-url): New procedure. (%transformations): Add 'with-git-url'. (%transformation-options, show-transformation-options-help): Add '--with-git-url'. * tests/scripts-build.scm ("options->transformation, with-git-url"): New test. 2019-03-16booloader: Add 'invoke/quiet'.Ludovic Courtès * gnu/build/bootloader.scm (G_): New macro. (open-pipe-with-stderr, invoke/quiet): New procedures. * tests/build-utils.scm ("invoke/quiet, success") ("invoke/quiet, failure") ("invoke/quiet, failure, message on stderr"): New tests. * po/guix/POTFILES.in: Add bootloader.scm. 2019-03-16tests: Add 'with-environment-variable'.Ludovic Courtès * tests/scripts.scm (with-environment-variable): Move to... * guix/tests.scm (with-environment-variable): ... here. * tests/build-utils.scm ("wrap-program, one input, multiple calls"): Use it instead of 'setenv'. 2019-03-15pack: "-RR" produces PRoot-enabled relocatable binaries.Ludovic Courtès * gnu/packages/aux-files/run-in-namespace.c (exec_with_proot): New function. (main): When 'clone' fails, call 'rm_rf'. [PROOT_PROGRAM]: When 'clone' fails, call 'exec_with_proot'. * guix/scripts/pack.scm (wrapped-package): Add #:proot?. [proot]: New procedure. [build]: Compile with -DPROOT_PROGRAM when PROOT? is true. * guix/scripts/pack.scm (%options): Set the 'relocatable?' value to 'proot when "-R" is passed several times. (guix-pack): Pass #:proot? to 'wrapped-package'. * tests/guix-pack-relocatable.sh: Use "-RR" on Intel systems that lack user namespace support. * doc/guix.texi (Invoking guix pack): Document -RR.