From 9bd2e741a94bfbb4b156cfd321c8dd81022cc4d3 Mon Sep 17 00:00:00 2001 From: Roy van den Broek Date: Fri, 31 Mar 2006 12:10:20 +0000 Subject: [PATCH] Added Maven 2.0.3. svn path=/nixpkgs/trunk/; revision=5131 --- pkgs/misc/maven/builder.sh | 14 ++++++++++++++ pkgs/misc/maven/default.nix | 15 +++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ pkgs/top-level/build-for-release.nix | 2 ++ 4 files changed, 35 insertions(+) create mode 100644 pkgs/misc/maven/builder.sh create mode 100644 pkgs/misc/maven/default.nix diff --git a/pkgs/misc/maven/builder.sh b/pkgs/misc/maven/builder.sh new file mode 100644 index 000000000000..734c5e0c4b56 --- /dev/null +++ b/pkgs/misc/maven/builder.sh @@ -0,0 +1,14 @@ +source $stdenv/setup +source $makeWrapper + +unpackPhase + +mkdir -p $out +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" diff --git a/pkgs/misc/maven/default.nix b/pkgs/misc/maven/default.nix new file mode 100644 index 000000000000..6ae961a5df54 --- /dev/null +++ b/pkgs/misc/maven/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl, jdk}: + +assert jdk != null; + +stdenv.mkDerivation { + name = "maven-2.0.3"; + builder = ./builder.sh; + src = fetchurl { + url = http://apache.cs.uu.nl/dist/maven/binaries/maven-2.0.3-bin.tar.bz2; + md5 = "14b3a62c45f5c7b3a7f72f87ffadb8e0"; + }; + makeWrapper = ../../build-support/make-wrapper/make-wrapper.sh; + + inherit jdk; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index df1e31ea31e2..3b388d86686c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2408,5 +2408,9 @@ rec { inherit (xlibs) libX11 libXext; patchelf = patchelfNew; }; + + maven = (import ../misc/maven) { + inherit stdenv fetchurl jdk; + }; } diff --git a/pkgs/top-level/build-for-release.nix b/pkgs/top-level/build-for-release.nix index 3f1d8022e5c4..ab5ad6266538 100644 --- a/pkgs/top-level/build-for-release.nix +++ b/pkgs/top-level/build-for-release.nix @@ -69,6 +69,7 @@ let { libxml2 libxslt lynx + maven mk mktemp mono @@ -159,6 +160,7 @@ let { libtool libxml2 libxslt + maven nxml subversion tetex