From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d71mZ-0003ym-GL for guix-patches@gnu.org; Sat, 06 May 2017 11:38:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d71mY-0003jj-Hq for guix-patches@gnu.org; Sat, 06 May 2017 11:38:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d71mY-0003jX-EV for guix-patches@gnu.org; Sat, 06 May 2017 11:38:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d71mY-0002RJ-7p for guix-patches@gnu.org; Sat, 06 May 2017 11:38:06 -0400 Subject: bug#26803: [PATCH 23/36] gnu: Add java-hamcrest-all. Resent-Message-ID: From: Ricardo Wurmus Date: Sat, 6 May 2017 17:36:04 +0200 Message-Id: <20170506153617.3074-23-rekado@elephly.net> In-Reply-To: <20170506153617.3074-1-rekado@elephly.net> References: <20170506153617.3074-1-rekado@elephly.net> 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: 26803@debbugs.gnu.org Cc: Ricardo Wurmus * gnu/packages/java.scm (java-hamcrest-all): New variable. --- gnu/packages/java.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 2a5797a5c..8006b4d21 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1485,6 +1485,39 @@ The jMock library @end itemize\n") (license license:bsd-3))) +(define-public java-hamcrest-all + (package (inherit java-hamcrest-core) + (name "java-hamcrest-all") + (arguments + (substitute-keyword-arguments (package-arguments java-hamcrest-core) + ;; FIXME: a range of unit tests fail because + ;; org.hamcrest.SelfDescribing is not found, although it is part of the + ;; hamcrest-core library that has just been built. + ((#:tests? _) #f) + ((#:build-target _) "bigjar") + ((#:phases phases) + `(modify-phases ,phases + ;; Some build targets override the classpath, so we need to patch + ;; the build.xml to ensure that required dependencies are on the + ;; classpath. + (add-after 'unpack 'patch-classpath-for-integration + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "build.xml" + (("( build/hamcrest-library-\\$\\{version\\}.jar)" line) + (string-join + (cons line + (append + (find-files (assoc-ref inputs "java-junit") "\\.jar$") + (find-files (assoc-ref inputs "java-jmock") "\\.jar$") + (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) + ";"))) + #t)))))) + (inputs + `(("java-junit" ,java-junit) + ("java-jmock" ,java-jmock-1) + ("java-easymock" ,java-easymock) + ,@(package-inputs java-hamcrest-core))))) + (define-public java-jopt-simple (package (name "java-jopt-simple") -- 2.12.2