The openjdk expression does not build right now because one of the currency 
definitions has just passed the limit of 10 years of validity.  The attached 
patch extends the limit to 20 years to restore the build.
>From de684458bfeedfa3204ae6e89a972344e8bec2ad Mon Sep 17 00:00:00 2001
From: Karn Kallio <[email protected]>
Date: Tue, 30 Dec 2014 10:39:43 -0430
Subject: [PATCH] openjdk : Patch to extend valid currency change dates to 20
 years.

---
 .../compilers/openjdk/currency-date-range.patch            | 14 ++++++++++++++
 pkgs/development/compilers/openjdk/default.nix             |  1 +
 2 files changed, 15 insertions(+)
 create mode 100644 pkgs/development/compilers/openjdk/currency-date-range.patch

diff --git a/pkgs/development/compilers/openjdk/currency-date-range.patch b/pkgs/development/compilers/openjdk/currency-date-range.patch
new file mode 100644
index 0000000..b1c4615
--- /dev/null
+++ b/pkgs/development/compilers/openjdk/currency-date-range.patch
@@ -0,0 +1,14 @@
+diff -Naur openjdk-7u65-b32-upstream/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java openjdk-7u65-b32/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
+--- openjdk-7u65-b32-upstream/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	2014-07-17 05:42:14.000000000 -0430
++++ openjdk-7u65-b32/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	2014-12-30 10:15:50.327905933 -0430
+@@ -281,8 +281,8 @@
+             checkCurrencyCode(newCurrency);
+             String timeString = currencyInfo.substring(4, length - 4);
+             long time = format.parse(timeString).getTime();
+-            if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
+-                throw new RuntimeException("time is more than 10 years from present: " + time);
++            if (Math.abs(time - System.currentTimeMillis()) > ((long) 20) * 365 * 24 * 60 * 60 * 1000) {
++                throw new RuntimeException("time is more than 20 years from present: " + time);
+             }
+             specialCaseCutOverTimes[specialCaseCount] = time;
+             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
diff --git a/pkgs/development/compilers/openjdk/default.nix b/pkgs/development/compilers/openjdk/default.nix
index 3c0ace0..b2350bc 100644
--- a/pkgs/development/compilers/openjdk/default.nix
+++ b/pkgs/development/compilers/openjdk/default.nix
@@ -66,6 +66,7 @@ stdenv.mkDerivation rec {
     ./fix-java-home.patch
     ./paxctl.patch
     ./read-truststore-from-env.patch
+    ./currency-date-range.patch
   ];
 
   NIX_NO_SELF_RPATH = true;
-- 
2.1.4

_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to