From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodoros Foradis Subject: [PATCH v2 0/1] gnu: Add plantuml. Date: Thu, 27 Oct 2016 14:18:52 +0300 Message-ID: <20161027111853.4405-1-theodoros.for@openmailbox.org> References: <20161027101329.GD18185@macbook42.flashner.co.il> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzilK-00061Q-Gb for guix-devel@gnu.org; Thu, 27 Oct 2016 07:22:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzilE-0002eU-OZ for guix-devel@gnu.org; Thu, 27 Oct 2016 07:22:22 -0400 Received: from smtp3.openmailbox.org ([62.4.1.37]:52130) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzilE-0002dr-Gq for guix-devel@gnu.org; Thu, 27 Oct 2016 07:22:16 -0400 In-Reply-To: <20161027101329.GD18185@macbook42.flashner.co.il> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Efraim Flashner writes: > I don't java, so I haven't tried it out, so my comments are mostly > cosmetic on the package definition. > > On Mon, Oct 24, 2016 at 04:12:25PM +0300, Theodoros Foradis wrote: >> + >> +(define-public plantuml >> + (package >> + (name "plantuml") >> + (version "8048") >> + (source (origin >> + (method url-fetch) >> + (uri (string-append >> + "https://downloads.sourceforge.net/project/plantuml/plantuml-" >> + version ".tar.gz")) > > this should be of the mirror://sourceforge type > fixed >> + (sha256 >> + (base32 >> + "1vipxd6p7isb1k1qqh4hrpfcj27hx1nll2yp0rfwpvps1w2d936i")))) >> + (build-system ant-build-system) >> + (arguments >> + `(#:tests? #f ; no tests >> + #:build-target "dist" >> + #:phases >> + (modify-phases %standard-phases >> + (add-before 'build 'delete-extra-from-cp >> + (lambda _ >> + (substitute* "build.xml" >> + (("1.6") "1.7")) >> + (substitute* "build.xml" >> + (("> + (substitute* "build.xml" >> + (("j2v8_macosx_x86_64-3.1.7.jar\" />") "-->")))) > > return #t > also, since they're all for the same set (build.xml), > you can take out the duplicate substitute* lines > done >> + (add-before 'install 'gen-install >> + (lambda* (#:key outputs #:allow-other-keys) >> + (mkdir-p "build/jar") >> + (system* "mv" "plantuml.jar" "build/jar") >> + ((@@ (guix build ant-build-system) default-build.xml) >> + "plantuml.jar" >> + (string-append (assoc-ref outputs "out") >> + "/share/java")))) >> + (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 >> + "#!" (assoc-ref inputs "bash") "/bin/sh\n\n" >> + (assoc-ref inputs "jre") "/bin/java -jar " >> + out "/share/java/plantuml.jar \"$@\"\n")))) >> + (chmod wrapper #o555))))))) >> + (inputs >> + `(("graphviz" ,graphviz) >> + ("bash" ,bash) >> + ("jre" ,icedtea "out"))) >> + (home-page "http://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 salt, a tool that can design simple >> +graphical interfaces.") >> + (license license:gpl3+))) >> -- >> 2.10.1 >> >> Also, I took Marius Bakke's advice, and added it to "uml.scm" instead. Thanks for your input. -- Theodoros Foradis