From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EEBSA0YW+2MlrQAAbAwnHQ (envelope-from ) for ; Sun, 26 Feb 2023 09:20:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6AiFAkYW+2PY9wAAG6o9tA (envelope-from ) for ; Sun, 26 Feb 2023 09:20:22 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E2742DACC for ; Sun, 26 Feb 2023 09:20:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWCGL-0001BH-90; Sun, 26 Feb 2023 03:20:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWCGJ-0001Ay-B8 for guix-patches@gnu.org; Sun, 26 Feb 2023 03:20:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWCGI-0000vH-W1 for guix-patches@gnu.org; Sun, 26 Feb 2023 03:20:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWCGH-0004yD-RI for guix-patches@gnu.org; Sun, 26 Feb 2023 03:20:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60976] [PATCH v3 3/4] gnu: Add ditaa Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Feb 2023 08:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60976 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Frank Pursel , 60976@debbugs.gnu.org Received: via spool by 60976-submit@debbugs.gnu.org id=B60976.167739957319060 (code B ref 60976); Sun, 26 Feb 2023 08:20:01 +0000 Received: (at 60976) by debbugs.gnu.org; 26 Feb 2023 08:19:33 +0000 Received: from localhost ([127.0.0.1]:42251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWCFo-0004xL-NN for submit@debbugs.gnu.org; Sun, 26 Feb 2023 03:19:33 -0500 Received: from lepiller.eu ([89.234.186.109]:34944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWCFl-0004x8-Rj for 60976@debbugs.gnu.org; Sun, 26 Feb 2023 03:19:31 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 04799aab; Sun, 26 Feb 2023 08:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=F6e3zxTEbPAe IJKz19NeSisrpv/eWBn7PPjOd95k2gg=; b=jPUAk5YtjKF4CII9QOB8Ct0LLBcN vEArvbreef3h6V64AKcoEPOc1HX0rqEc4CtGb9pY0iZru+pwoPUhJJsM7Q+ViU/T /hFecdZiQmLCDdcdE3ogqp0io410um0UgjzKPk3mSuC11ADKhOYaksysLFNSLM15 D/wP/E6JxBtS6PibX4ZcpNqme/qbvdQ/VNaZHrkjACGbH2JWOsX6E6CiANtbpSbN u2dT9q6tdZS8M3nWQvC3mi4/2c/pcTmcN8j4eNqAeJ6rN+7pES1i6VPTk08WwHFn bPXsZmjluzKD8qTNDfGVnED6P9uZksKYOf72Kn7wJhT1BwlyFYmLhNu5oA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 90b9e164 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 26 Feb 2023 08:19:26 +0000 (UTC) Date: Sun, 26 Feb 2023 09:19:25 +0100 From: Julien Lepiller User-Agent: K-9 Mail for Android In-Reply-To: <51d9aae0d048aebfccc46b5363271dc4f2bc64be.1677369969.git.frank.pursel@gmail.com> References: <1351eea169a28d30040826b14079fb49de3c98b8.1677369969.git.frank.pursel@gmail.com> <51d9aae0d048aebfccc46b5363271dc4f2bc64be.1677369969.git.frank.pursel@gmail.com> Message-ID: <5B15B2D7-0E82-4D0C-A188-7086E45BDB8C@lepiller.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677399621; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rWJtU9t5U9DnaLmd2vhfydeSI/+dLW9+Kf+4WDe1N5w=; b=eJnqGEdt+ieL9h24ZZMgf48pz7ALhXn50Z4kRm/xydePqqxTGyC0hEeQvOAuLHE2m2Hy9G ARnfJOt3NYrMMRvWSprNQfLjO/P9aA77prDvW5oXHZxHH9yXt03YgRBJuCac4A/eyg1QfF YbfGdWD9ORNAriWnJG0+mk6VE2JwBxZx60U82BUnGgr8l2YvPsvsr7KmD00rEH0xUTd6KU e2gbaC2kEf1W1ArPJp8wxEFgv12QG3Xb8+cZ25QEW54Vcgt+TtYLWJuKObgAa+FIUiGWmQ KYdUe9r2c0tEmOLmfMGVvf4sU18iBmNviJ9ZGpe8/VBX51IkZGa89idpHtvUXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=jPUAk5Yt; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677399621; a=rsa-sha256; cv=none; b=nXWZNhCUayt5qCr6xWozejeP+1wIPg5TzcGy9fU+iglHdLE9AZ+QN6hhKUz9nskMCtWYQq DMymqR9EAkChHOajL3rF5WPTvuLMBvmLW953HrBM6EiM+pc4jMpcjsqWKXibnTtrrFUeZE VY9m5Bmd4fiM1UsDMu8Ac6+zePYq+m2cnX/C25ICPNYMEhzWrLqhEm21e/o1WCPvtgMNSo FZxwbniMZdG7IYfDqkSCzpTvE7kW8GkZbENAy8fv93RHPeR6vLUt18cgTw7GlY3bohkf5c p0r38y/RWEjJOOiySYCTCXJE0vR043oFAl9xLnmEjkQrDh3xUQzpG+8GfsBN4A== X-Spam-Score: -2.09 X-Migadu-Queue-Id: 9E2742DACC X-Migadu-Spam-Score: -2.09 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=jPUAk5Yt; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: KUwmR0foutMU Hi, Thanks again for the patch series=2E Comments below=2E Could you adress th= ese and the others, and send a v2 for this patch series? I think "guix lint" would have caught most of these ;) Well, first I'm not sure this requires a new file=2E Maybe java-graphics= =2Escm would be a better place? If you add a new file anyway, you need to a= dd it to the list in gnu/local=2Emk too and add it to the commit log=2E Le 26 janvier 2023 18:01:17 GMT+01:00, Frank Pursel a =C3=A9crit=C2=A0: >--- > gnu/packages/ditaa=2Escm | 145 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 145 insertions(+) > create mode 100644 gnu/packages/ditaa=2Escm > >diff --git a/gnu/packages/ditaa=2Escm b/gnu/packages/ditaa=2Escm >new file mode 100644 >index 0000000000=2E=2Ee1f063e179 >--- /dev/null >+++ b/gnu/packages/ditaa=2Escm >@@ -0,0 +1,145 @@ >+;;; GNU Guix --- Functional package management for GNU >+;;; >+;;; This file is part of GNU Guix=2E >+;;; >+;;; 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 (a= t >+;;; your option) any later version=2E >+;;; >+;;; 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=2E See the >+;;; GNU General Public License for more details=2E >+;;; >+;;; You should have received a copy of the GNU General Public License >+;;; along with GNU Guix=2E If not, see =2E >+;;; >+;;; Copyright =C2=A9 2023 Frank Pursel >+;;; >+ >+(define-module (gnu packages ditaa) >+ #:use-module (gnu packages) >+ #:use-module (gnu packages bash) >+ #:use-module (gnu packages batik) >+ #:use-module (gnu packages java) >+ #:use-module (gnu packages java-xml) >+ #:use-module (gnu packages xml) >+ #:use-module (guix build-system ant) >+ #:use-module (guix build utils) >+ #:use-module (guix download) >+ #:use-module (guix git-download) >+ #:use-module ((guix licenses) #:prefix license:) >+ #:use-module (guix packages) >+ #:use-module (guix modules) >+ ) This parenthesis feels lonely :) >+ >+(define-public ditaa >+ (package >+ (name "ditaa") >+ (version "0=2E11=2E0") >+ (source (origin >+ (method git-fetch) >+ (uri (git-reference >+ (url "https://github=2Ecom/stathissideris/ditaa") >+ (commit (string-append "v" version)))) >+ (file-name (git-file-name name version)) >+ (sha256 >+ (base32 >+ "1y3g17wp1wvb05m56pp25avww2njpgh0gk0jsbsf25scj7hyyj26")) >+ (modules '((guix build utils))) >+ (snippet >+ '(begin >+ (format #t "~%~a~%" "Finding and removing sourced jars= =2E") Nitpicking, but "embedded" might be a better term, wdyt? >+ (for-each >+ (lambda (jarf) >+ (delete-file jarf) >+ (format #t "Deleted: ~a~%" jarf)) >+ (find-files "=2E" "\\=2Ejar$")))))) >+ (build-system ant-build-system) >+ (inputs (list bash-minimal)) >+ (native-inputs (list java-libbatik java-commons-cli java-w3c-svg >+ java-jericho-html `(,icedtea "jdk") java-junit)= ) You shouldn't need icedtea in native-inputs, it's already added by the ant= -build-system=2E Maybe you need the default output instead? To get a "java"= binary from a small package instead of depending on the whole jdk at runti= me? >+ (arguments >+ `(#:build-target "release-all" >+ #:phases >+ (modify-phases %standard-phases >+ ;; Ant's buildfile and build tree need to be modified >+ ;; to provide access to the guix builds of the >+ ;; batik and the java-commons-cli >+ ;; jar files=2E Also some of the source requires java7=2E >+ (add-before 'build 'build-prep >+ (lambda* (#:key inputs outputs #:allow-other-keys) >+ (let* ((batik-jar (search-input-file inputs >+ "share/java/batik=2E= jar")) >+ (commons-cli-jar (search-input-file inputs >+ "lib/m2/common= s-cli/commons-cli/1=2E4/commons-cli-1=2E4=2Ejar"))) >+ (mkdir-p "lib") >+ (copy-file batik-jar "=2E/lib/batik=2Ejar") >+ (copy-file commons-cli-jar "=2E/lib/commons-cli=2Ejar")= ) >+ (with-directory-excursion "build" >+ (substitute* "release=2Exml" >+ (("source=3D\"1=2E6\"") >+ "source=3D\"7\"") >+ (("") >+ (string-append "= " >+ "\n" ""= )))) >+ #t)) Again, no need to end with #t=2E >+ (replace 'build >+ (lambda* _ >+ (setenv "ANT_OPTS" >+ (string-append "-Dversion=2Estring=3D" >+ ,version)) >+ (with-directory-excursion "build" >+ (invoke "ant" "-f" "release=2Exml" "release-jar")) #t)) Same here=2E >+ (replace 'check >+ (lambda* (#:key tests? #:allow-other-keys) >+ (if tests? >+ (begin >+ (setenv "ANT_OPTS" >+ (string-append "-Dversion=2Estring=3D" >+ ,version)) >+ (mkdir-p "tests/testlib") >+ (with-directory-excursion "build" >+ (invoke "ant" "-f" "release=2Exml" >+ "generate-test-images") >+ (invoke "ant" "test"))) #f))) And here=2E >+ (replace 'install >+ (lambda* (#:key inputs outputs #:allow-other-keys) >+ (let* ((out (assoc-ref outputs "out")) >+ (lib (string-append out "/lib")) >+ (bin (string-append out "/bin")) >+ (bash (search-input-file inputs "bin/bash")) >+ (java (search-input-file inputs "bin/java")) >+ (jre (search-input-directory inputs "jre")) >+ (ditaa (string-append out "/bin/ditaa")) >+ (jar-name (string-append ,name >+ ,version "=2Ejar"))) >+ (with-directory-excursion "releases" >+ (install-file jar-name lib)) >+ (mkdir-p bin) >+ (with-output-to-file ditaa >+ (lambda _ >+ (format #t "#!~a~%JAVA_HOME=3D~a ~a -jar ~a/~a $@~%= " >+ bash jre java lib jar-name))) >+ (chmod ditaa #o755)) #t)) >+ (add-after 'install 'install-docs >+ (lambda* (#:key outputs #:allow-other-keys) >+ (let ((doc (string-append (assoc-ref outputs "out") >+ "/share/doc/"))) >+ (for-each (lambda (filen) >+ (install-file filen doc)) >+ (find-files "=2E" "=2E*README\\=2Emd"))) #t))= ))) No need for #t=2E >+ (home-page "https://github=2Ecom/stathissideris/ditaa") >+ (synopsis "Create graphics from ascii art") >+ (description >+ "ditaa is a small command-line utility=20 >+that converts diagrams drawn using ascii art=20 >+('drawings' that contain characters that resemble lines like | / - ),=20 >+into proper bitmap graphics=2E") Maybe @samp{|}, @samp{/}, =E2=80=A6 >+ (license license:lgpl3))) >+ >+ >+ >+ >+ And remove these additional empty lines=2E