From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8SY6-0006fa-Ma for guix-patches@gnu.org; Wed, 10 May 2017 10:25:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8SY2-00081h-Mw for guix-patches@gnu.org; Wed, 10 May 2017 10:25:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34171) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8SY2-00081d-Ig for guix-patches@gnu.org; Wed, 10 May 2017 10:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8SY2-0002z0-BA for guix-patches@gnu.org; Wed, 10 May 2017 10:25:02 -0400 Subject: bug#26803: [PATCH 15/36] gnu: Add java-commons-io. Resent-Message-ID: References: <20170506153617.3074-1-rekado@elephly.net> <20170506153617.3074-15-rekado@elephly.net> <87r2zwhkf4.fsf@elephly.net> From: Roel Janssen In-reply-to: <87r2zwhkf4.fsf@elephly.net> Date: Wed, 10 May 2017 16:24:02 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: Ricardo Wurmus Cc: Hartmut Goebel , 26803@debbugs.gnu.org Ricardo Wurmus writes: > Roel Janssen writes: > >> Ricardo Wurmus writes: >> >>> From: Hartmut Goebel >>> >>> * gnu/packages/java.scm (java-commons-io): New variable. >>> >>> Co-authored-by: Ricardo Wurmus >>> --- > […] >>> + (arguments >>> + `(#:test-target "test" >>> + #:phases >>> + (modify-phases %standard-phases >>> + (add-after 'unpack 'symlink-junit.jar >>> + (lambda* (#:key inputs #:allow-other-keys) >>> + ;; TODO: don't do this; use make-flags >>> + ;; The existence of this file is taken as indicator whether test >>> + ;; dependencies will to be downloaded. >>> + (let ((junit (assoc-ref inputs "java-junit")) >>> + (junit-version "4.12")) ; from build.xml >>> + (mkdir-p "lib") >>> + (symlink (string-append junit "/share/java/junit.jar") >>> + (string-append "lib/junit-" junit-version ".jar")) >>> + #t))) >> >> I'm not sure how the result of the code here could be achieved >> using 'make-flags', so is the TODO item referring to an already-removed >> piece of code? > > Oh, I forgot about this. It’s actually pretty easy to do this with > make-flags: > > #:make-flags > (list (string-append "-Djunit.jar=" > (assoc-ref %build-inputs "java-junit") > "/share/java/junit.jar")) > > Much nicer than symlinking things! > I’ll push it with this change. Yes, definitely. Very nice! Is the "lib" directory automatically created this way? LGTM. Kind regards, Roel Janssen