diff --git a/pkgs/development/compilers/j2sdk/builder.sh b/pkgs/development/compilers/j2sdk/builder.sh index 1f19cde82a81..b01efbe881e3 100644 --- a/pkgs/development/compilers/j2sdk/builder.sh +++ b/pkgs/development/compilers/j2sdk/builder.sh @@ -1,7 +1,7 @@ +#!/bin/sh . $stdenv/setup || exit 1 -version=j2sdk1.4.2_03 -src=$version.bin +src=$filename.bin cp $pathname $src || exit 1 @@ -18,4 +18,4 @@ alias more=cat yes yes | ./$src || exit 1 mkdir $out || exit 1 -mv $version/* $out/ || exit 1 +mv $dirname/* $out/ || exit 1 diff --git a/pkgs/development/compilers/j2sdk/default-1.5.nix b/pkgs/development/compilers/j2sdk/default-1.5.nix new file mode 100644 index 000000000000..c55b6b1830f7 --- /dev/null +++ b/pkgs/development/compilers/j2sdk/default-1.5.nix @@ -0,0 +1,10 @@ +{stdenv, fetchurl}: + +if stdenv.system == "i686-linux" + then + (import ./j2sdk1.5-sun-linux.nix) { + stdenv = stdenv; + fetchurl = fetchurl; + } + else + false diff --git a/pkgs/development/compilers/j2sdk/j2sdk-sun-linux.nix b/pkgs/development/compilers/j2sdk/j2sdk-sun-linux.nix index 6e3d8eb98e7f..795d43aab0f6 100644 --- a/pkgs/development/compilers/j2sdk/j2sdk-sun-linux.nix +++ b/pkgs/development/compilers/j2sdk/j2sdk-sun-linux.nix @@ -14,6 +14,8 @@ assert stdenv.system == "i686-linux"; derivation { name = "j2sdk-1.4.2"; + filename = "j2sdk-1.4.2_03"; + dirname = "j2sdk1.4.2_03"; system = stdenv.system; builder = ./builder.sh; pathname = "/tmp/j2sdk-1_4_2_03-linux-i586.bin"; diff --git a/pkgs/development/compilers/j2sdk/j2sdk1.5-sun-linux.nix b/pkgs/development/compilers/j2sdk/j2sdk1.5-sun-linux.nix new file mode 100644 index 000000000000..b1e3773e89af --- /dev/null +++ b/pkgs/development/compilers/j2sdk/j2sdk1.5-sun-linux.nix @@ -0,0 +1,24 @@ +/** + * This Nix expression requires the user to download the j2sdk + * distribution to /tmp. Please obtain j2sdk-1_5_0-beta-linux-i586.bin + * from java.sun.com by hand and place it in /tmp. Blame Sun, not me. + * + * Note that this is not necessary if someone has already pushed a + * binary. + * + * @author Martin Bravenboer + */ +{stdenv, fetchurl}: + +assert stdenv.system == "i686-linux"; + +derivation { + name = "j2sdk-1.5.0-beta"; + filename = "j2sdk-1_5_0-beta"; + dirname = "j2sdk1.5.0"; + system = stdenv.system; + builder = ./builder.sh; + pathname = "/tmp/j2sdk-1_5_0-beta-linux-i586.bin"; + md5 = "1e6af0d64563b085ffadec97db365b19"; + stdenv = stdenv; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 6d605f54f046..89e7b08d4582 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -224,6 +224,10 @@ rec { inherit fetchurl stdenv; }; + j2sdk15 = (import ../development/compilers/j2sdk/default-1.5.nix) { + inherit fetchurl stdenv; + }; + strategoxt = (import ../development/compilers/strategoxt) { inherit fetchurl stdenv aterm; sdf = sdf2;