From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d71le-0003T7-7M for guix-patches@gnu.org; Sat, 06 May 2017 11:37:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d71ld-0002fg-2Q for guix-patches@gnu.org; Sat, 06 May 2017 11:37:10 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60074) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d71lc-0002fP-US for guix-patches@gnu.org; Sat, 06 May 2017 11:37:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d71lc-0002KX-OV for guix-patches@gnu.org; Sat, 06 May 2017 11:37:08 -0400 Subject: bug#26803: [PATCH 13/36] gnu: Add java-jmh. Resent-Message-ID: From: Ricardo Wurmus Date: Sat, 6 May 2017 17:35:54 +0200 Message-Id: <20170506153617.3074-13-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-jmh): New variable. --- gnu/packages/java.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 5d131929c..36d80ff1d 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -23,6 +23,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix hg-download) #:use-module (guix utils) #:use-module (guix build-system ant) #:use-module (guix build-system gnu) @@ -1518,3 +1519,48 @@ overly clever.") mathematics and statistics components addressing the most common problems not available in the Java programming language or Commons Lang.") (license license:asl2.0))) + +(define-public java-jmh + (package + (name "java-jmh") + (version "1.17.5") + (source (origin + (method hg-fetch) + (uri (hg-reference + (url "http://hg.openjdk.java.net/code-tools/jmh/") + (changeset version))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "jmh-core.jar" + #:source-dir "jmh-core/src/main" + #:test-dir "jmh-core/src/test" + #:phases + (modify-phases %standard-phases + ;; This seems to be a bug in the JDK. It may not be necessary in + ;; future versions of the JDK. + (add-after 'unpack 'fix-bug + (lambda _ + (with-directory-excursion + "jmh-core/src/main/java/org/openjdk/jmh/runner/options" + (substitute* '("IntegerValueConverter.java" + "ThreadsValueConverter.java") + (("public Class valueType") + "public Class valueType"))) + #t))))) + (inputs + `(("java-jopt-simple" ,java-jopt-simple) + ("java-commons-math3" ,java-commons-math3))) + (native-inputs + `(("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core))) + (home-page "http://openjdk.java.net/projects/code-tools/jmh/") + (synopsis "Benchmark harness for the JVM") + (description "JMH is a Java harness for building, running, and analysing +nano/micro/milli/macro benchmarks written in Java and other languages +targetting the JVM.") + ;; GPLv2 only + (license license:gpl2))) -- 2.12.2