From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:47804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMtDz-0003Ks-L3 for guix-patches@gnu.org; Sat, 04 May 2019 07:53:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMtDy-00041f-Mq for guix-patches@gnu.org; Sat, 04 May 2019 07:53:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMtDy-00041W-JH for guix-patches@gnu.org; Sat, 04 May 2019 07:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMtDy-0007FK-B7 for guix-patches@gnu.org; Sat, 04 May 2019 07:53:02 -0400 Subject: [bug#35545] [PATCH 06/17] gnu: javacc: Install binaries. Resent-Message-ID: References: <20190503145820.606f37db@sybil.lepiller.eu> <20190503130134.24788-1-julien@lepiller.eu> <20190503130134.24788-6-julien@lepiller.eu> From: Ricardo Wurmus In-reply-to: <20190503130134.24788-6-julien@lepiller.eu> Date: Sat, 04 May 2019 13:52:11 +0200 Message-ID: <87y33mfndg.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Julien Lepiller Cc: 35545@debbugs.gnu.org Julien Lepiller writes: > * gnu/packages/java.scm (javacc)[arguments]: Add install-bin phase. [=E2=80=A6] > + (add-after 'install 'install-bin > + (lambda* (#:key outputs inputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (dir (string-append out "/share/java")) > + (bin (string-append out "/bin"))) > + (mkdir-p bin) > + (with-output-to-file (string-append bin "/javacc") > + (lambda _ > + (display > + (string-append "#!/bin/sh\n" > + (assoc-ref inputs "jdk") "/bin/java" > + " -cp " dir "/javacc.jar" " `basenam= e $0`" " $*")))) I think it=E2=80=99s better not to use basename here. We already know the = store location. > + (chmod (string-append bin "/javacc") #o755) > + (symlink (string-append bin "/javacc") > + (string-append bin "/jjdoc")) > + (symlink (string-append bin "/javacc") > + (string-append bin "/jjtree")))))))) Why symlink javacc with different names? Since you=E2=80=99re reusing the javacc file name so often it makes sense to let-bind it. Please end the build phase on #T. -- Ricardo