diff --git a/pkgs/misc/maven/builder.sh b/pkgs/misc/maven/builder.sh index 734c5e0c4b56..c2b9fb75a65e 100644 --- a/pkgs/misc/maven/builder.sh +++ b/pkgs/misc/maven/builder.sh @@ -9,6 +9,6 @@ cp -r $name/* $out # Make a backup of the original directory cp -r $out/bin $out/bin-orig # Remove the original mvn from the bin directory -rm $out/bin/mvn -# Set the JAVA_HOME variable when using `mvn' -makeWrapper "$out/bin-orig/mvn" "$out/bin/mvn" --set JAVA_HOME "$jdk" +rm $out/bin/$mavenBinary +# Set the JAVA_HOME variable when using Maven +makeWrapper "$out/bin-orig/$mavenBinary" "$out/bin/$mavenBinary" --set JAVA_HOME "$jdk" diff --git a/pkgs/misc/maven/default.nix b/pkgs/misc/maven/default.nix index 6ae961a5df54..cbc0309671e7 100644 --- a/pkgs/misc/maven/default.nix +++ b/pkgs/misc/maven/default.nix @@ -4,6 +4,7 @@ assert jdk != null; stdenv.mkDerivation { name = "maven-2.0.3"; + mavenBinary = "mvn"; builder = ./builder.sh; src = fetchurl { url = http://apache.cs.uu.nl/dist/maven/binaries/maven-2.0.3-bin.tar.bz2; @@ -12,4 +13,4 @@ stdenv.mkDerivation { makeWrapper = ../../build-support/make-wrapper/make-wrapper.sh; inherit jdk; -} \ No newline at end of file +} diff --git a/pkgs/misc/maven/maven-1.0.nix b/pkgs/misc/maven/maven-1.0.nix new file mode 100644 index 000000000000..2c84b6f006cb --- /dev/null +++ b/pkgs/misc/maven/maven-1.0.nix @@ -0,0 +1,16 @@ +{stdenv, fetchurl, jdk}: + +assert jdk != null; + +stdenv.mkDerivation { + name = "maven-1.0.2"; + mavenBinary = "maven"; + builder = ./builder.sh; + src = fetchurl { + url = http://apache.cs.uu.nl/dist/maven/binaries/maven-1.0.2.tar.bz2; + md5 = "81a6b4393e550635efe19e95cea38718"; + }; + makeWrapper = ../../build-support/make-wrapper/make-wrapper.sh; + + inherit jdk; +}